[Ironruby-core] Evil Fun with IronRuby

Curt Hagenlocher curth at microsoft.com
Wed Jun 18 12:08:56 EDT 2008


We wouldn't be very true to Ruby if we didn't allow you to "monkey patch" CLR classes and interfaces.  And really, this isn't all that different than using extension methods in C#.

All classes in IronRuby have a "RubyClass" object associated with them, even if the class is being imported from the CLR.  It's this object that defines and manages the Ruby aspects of the class implementation.

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Joe Fiorini
Sent: Wednesday, June 18, 2008 7:14 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Evil Fun with IronRuby

Hey all,

I posted the results of some recent experimenting with IronRuby to my blog at: http://faithfulgeek.org/2008/6/17/evil-fun-with-ironruby.  My question is, how do these things work under the covers?  Do .NET types that have a Ruby equivalent get treated as the Ruby type or is there an extra layer that allows any .NET type to be modified at runtime?  It's totally cool that any of this is possible, but I was very surprised that it is.

Thanks all!

--
joe fiorini
http://www.faithfulgeek.org
// freelancing & knowledge sharing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080618/fa63a720/attachment.html>


More information about the Ironruby-core mailing list