From: Brian Candler Date: 2010-11-24T20:14:15+09:00 Subject: Re: Ruby 1.8 vs 1.9 Chuck Remes wrote in post #963430: > I use 1.9.2p0 daily and find it to be extremely stable and fast. I would > say the biggest reason to use it is to get a performance boost. Most of > your code from 1.8 will "just work." My code sees a 2-5x speedup on > 1.9.2 versus 1.8.7. And just to give some balance: the biggest reason not to use 1.9 is because of the incredible complexity which has been added to the String class, and the ability it gives you to make programs which crash under unexpected circumstances. For example, an expression like s1 = s2 + s3 where s2 and s3 are both Strings will always work and do the obvious thing in 1.8, but in 1.9 it may raise an exception. Whether it does depends not only on the encodings of s2 and s3 at that point, but also their contents (properties "empty?" and "ascii_only?") The encodings of strings you read may also be affected by the locale set from the environment, unless you explicitly code against that. This means the same program with the same data may work on your machine, but crash on someone else's. https://github.com/candlerb/string19/blob/master/string19.rb https://github.com/candlerb/string19/blob/master/soapbox.rb -- Posted via http://www.ruby-forum.com/.