O'Reilly logo

IronRuby Unleashed by Shay Friedman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Extending IronRuby

Iron Ruby provides amazing interoperability between Ruby and CLR objects. As a result, you can seamlessly use every .NET class inside IronRuby code. However, there are times when you want to write code in a static language that will act as a native Ruby object from within IronRuby code.

This is not a new idea. Ruby itself provides a way to write extensions in C: native extensions.

There are several reasons for that. The first reason might be to handle Win32 API calls. IronRuby can’t call the Win32 API like C# or VB.Net do with DllImport. To solve this issue, you can either write a regular .NET assembly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required