[Ironruby-core] How can you return the Rubified version of a CLR object back to the CLR?

Tomas Matousek Tomas.Matousek at microsoft.com
Fri Feb 4 18:30:47 EST 2011


This is by design. System.String doesn't really have "reverse" method. IronRuby just pretends it's there to make work more like Ruby string. So while you're writing Ruby code you use these convenience methods, but once you're in another context (another language, be it C#, or Python) you won't see them. 

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Greg Houston
Sent: Friday, February 04, 2011 1:45 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] How can you return the Rubified version of a CLR object back to the CLR?

Using IronRuby from C# is like a one-way street.   I can take a C#
object, and use it from the DLR.  But I can't enhance that object and
return it back to C#.   When I return it back, it looses all the Ruby
joy!

I've got an example of what I mean at http://pastie.org/1529598

How can I get a CLR object back from IronRuby that keeps all the goodness that Ruby gave it?

= Greg

--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list