Gary Wright
2/1/2008 3:56:00 PM
On Feb 1, 2008, at 3:25 AM, Rk Ch wrote:
> I use Array.to_s convert to string. Ruby 1.9.0 return like [["sample
> string"]], but 1.8.6 return only the value.
> How to resolve this problem? I really don't want to revise so many
> lines
> of code. :)
One option is to switch to Array#join, which also works for nested
arrays:
>> [1,2,3].join
=> "123"
>> [1,2,[3,4],5].join
=> "12345"