Hi -- On Mon, 9 Nov 2009, Rick DeNatale wrote: > On Sun, Nov 8, 2009 at 9:39 AM, David A. Black <dblack / rubypal.com> wrote: > >> Mind you, I really don't think it would be a calamity, just a little >> hard to account for in terms of what's around it. > > Not completely on-point, but I tend to be rather conservative when > thinking about such proposed changes. > > I've recently taken over an existing Rails app, one of the first tasks > was to get it to run with Ruby 1.9. > > Most of the changes I needed to make turned out to do with the fact > that 1.9 redefined Array#to_s > > Where prior to 1.9 Array#to_s was the same as Array#join so: > > [1, nil, "foo"].to_s => "1foo" > > in 1.9 it's been redefined to be the same as Array#inspect so: > > [1, nil, "foo"].to_s => "[1, nil, \"foo\"]" > > I was surprised at how many times an array was used in a context which > expected the pre-1.9 behavior. > > When I explained to the client that so many changes were caused > because Ruby 1.9 changed Array#to_s his response was "Why did they do > that?" > > Of course the upside of such changes is that they generate billable > hours, but I'd rather generate more value per hour. But c'est la vie! I'll take on all comers in the matter of being conservative about changes to Ruby :-) Part of the case with the examples you're referring to, though, is the fact that 1.9 is more of a major-number change, in spirit, than it sounds like. David -- The Ruby training with D. Black, G. Brown, J.McAnally Compleat Jan 22-23, 2010, Tampa, FL Rubyist http://www.thecompleatrubyist.com David A. Black/Ruby Power and Light, LLC (http://www.rubypal.com)