[Ironruby-core] IronRuby for GIMP
Maurits Rijk
lists at ruby-forum.com
Thu Oct 30 03:33:41 EDT 2008
Thanks!
I'm still a bit surprised that one has to do the conversion explicitly.
I would expect that either IronRuby uses CLR arrays (and strings) or
would do the conversion implicitly for me. But as I said in my previous
mail, I'm new to IronRuby and probably missing a whole bunch of design
decisions and other relevant information.
Regards, Maurits
Tomas Matousek wrote:
> RubyArrays are not implicitly convertible to CLR arrays.
>
> You need something like:
>
> def to_string_vector array
> list = System::Collections::Generic::List[ClrString].new
> array.each {|x| list.add(x.to_s.to_clr_string) }
> list.to_array
> end
>
> Tomas
--
Posted via http://www.ruby-forum.com/.
More information about the Ironruby-core
mailing list