In Ruby, if you do something like
print ["Hello", 1, 2]
You get an output like
["Hello" , 1 , 2]
Have some ArrayList object, list in Java. It contains objects of type Object.
I am passing this list to my Ruby code. When you print this, the console outputs something like
<Java::JavaUtil::ArrayList:0x5ab077a7>
Which is correct, of course.
However, I would like to get the same behaviour as above. If list contains two objects of type Object, when Ruby pints it, I want to get
[Object:0x1234567 , Object:0x21432423]
Rather than the reference of the list itself.
I suspect I should convert list to RubyArray before passing it to Ruby. But how?