[Ironruby-core] Calling a C# static from IronRuby

Ivan Porto Carrero ivan at flanders.co.nz
Tue Nov 17 12:29:36 EST 2009


both work :: but in practice you see . more often though (it should also be
SomeClass::new if we're going down that route :))

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/82031?help-en
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250948
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250943
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Google Wave: portocarrero.ivan at googlewave.com
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)



On Tue, Nov 17, 2009 at 4:29 PM, Ryan Riley <ryan.riley at panesofglass.org>wrote:

> On Fri, Nov 13, 2009 at 1:06 PM, Shay Friedman <shay.friedman at gmail.com>wrote:
>
>> I guess you can do that in two ways.
>>
>> The first one is to add a statement in Ruby code:
>>
>> class Object
>>   def mymethod(str)
>>     MyCSharpClass.mymethod(str)
>>   end
>> end
>>
>>
> Maybe I'm missing something, but shouldn't that be:
>
>   def mymethod(str)
>     MyCSharpClass*::*mymethod(str)   # Use '::' instead of '.'?
>   end
>
> Ryan Riley
>
> Email: ryan.riley at panesofglass.org
> LinkedIn: http://www.linkedin.com/in/ryanriley
> Blog: http://wizardsofsmart.net/
> Website: http://panesofglass.org/
>
> _______________________________________________
> 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/20091117/3da085d6/attachment.html>


More information about the Ironruby-core mailing list