[Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string?

Ivan Porto Carrero ivan at flanders.co.nz
Thu Apr 16 12:12:07 EDT 2009

Monkey patch ClrString with the methods you need?
Or make your C# method return MutableString if you are able to
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
GSM: +32.486.787.582
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Thu, Apr 16, 2009 at 5:59 PM, Ben Hall <ben2004uk at googlemail.com> wrote:

> Hello,
> Just hosted the DLR within an application to allow users some
> scripting functionality.  Part of the functionality is that you can
> call a C# method and have a string returned. However, the string is
> always being returned as a ClrString which means methods like << don't
> work which is annoying.  Having to write to_s after every call isn't
> great for my nice clean DSL :)
> How can I get around this? I want my C# method to return Ruby string.
> Thanks
> Ben
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090416/d9a1982a/attachment.html>

More information about the Ironruby-core mailing list