From: Stefan Rusterholz Date: 2008-02-02T19:18:24+09:00 Subject: Re: Problem: Array.to_s return [["..."]] in 1.9.0 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. :) > > > Here's the sample code : > > text="Source String line......." > d_lo=text.scan(/Str(.*?)g/).to_s > puts d_lo > > 1.8.6 return:in > 1.9.0 return:[["in"]] Why do you use scan if you don't really want to scan? text="Source String line......." d_lo=text[/Str(.*?)g/, 1] puts d_lo I didn't test it on 1.9, but it should work the same. Regards Stefan -- Posted via http://www.ruby-forum.com/.