Possible Duplicate:
Ruby 1.9 Array.to_s behaves differently?
I wonder if anyone can tell me what changed between Ruby 1.8.7 and Ruby 1.9.3. I have an example listed below that behaves totally different in the 2 versions but according to the Ruby docs it doesn't appear anything changed between these versions.
Ruby 1.8
number = '123-45-6789'
# => "123-45-6789"
number.scan(/[0-9]/)
# => ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
number.scan(/[0-9]/).to_s
# => "123456789"
Ruby 1.9
number = '123-45-6789'
# => "123-45-6789"
number.scan(/[0-9]/)
# => ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
number.scan(/[0-9]/).to_s
# => "[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]"
Not really looking for a different way to do this just curious as to what changed between the two versions.