Thank you!
--
Posted via http://www.ruby-forum.com/.
___
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
[3,4] is not an array of objects. It's a RubyArray.
You can create a CLR array like this:
v = System::Array.of(Object).new(3)
[1,2,3].each_with_index { |x,i| v[i] = x }
Tomas
-Original Message-
From: ironruby-core-boun...@rubyforge.org
[mailto:ironruby-core-boun...@rubyforge.org] On B
You'll need to build a CLR array rather than a Ruby array.
require 'mscorlib'
System::Array.create_instance(System::Object.to_clr_type, 2)
o = System::Array.create_instance(System::Object.to_clr_type, 2)
>>> o[0] = 3
>>> o[1] = 4
You can monkey-patch Array and add this as a helper:
class Array