Ruby 1.9 Array.to_s behaves differently?

Yes, you’re calling to_s on an array of strings. In 1.8 that is equivalent to calling join, in 1.9 it is equivalent to calling inspect.

To get the behavior you want in both 1.8 and 1.9, call join instead of to_s.

Leave a Comment