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 ...

Get IronRuby Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.