Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Ruby 1.8.8 and the Road to Ruby 1.9.1

Ruby 1.8.8 and the Road to Ruby 1.9.1

This item in japanese

With Ruby 1.9.1, the stable version of Ruby 1.9 is now available, yet many are still reluctant to switch, be it for lack of 1.9 compatible libraries or uneven tool support.

Ruby 1.8.6 will be maintained for the near future, despite the fact that Ruby 1.8.7 has been available for quite some time. Ruby 1.8.7 caused some debate because it backported some features from 1.9 and also had some breaking changes (compared to 1.8.6), which also prompted the JRuby team to skip Ruby 1.8.7 support for the moment (although that might change).

The debates about the future of the 1.8.x branch  was restarted recently, partly because Ruby 1.8.8 is supposed to be released later this year.

In this discussion, the maintainer of Ruby 1.8.7+, Akinori MUSHA, posted a rationale for the plans for 1.8.8:

1.9 is the only future and 1.8.6 or prior is the ancient past for you. 1.8.7 is the past too, but you might as well support ruby 1.8.7+ as an extra gift for not-ready-to-move users only if you feel it's not too hard. In ruby 1.8.8, syntactic compatibility will be added to make it even easier to write code for both 1.9 and 1.8.8+ in a single source file without compromising optimizations for 1.9.

If you still need to write code for 1.8.6 but have some intention to support 1.9 in future, then try running your program under ruby 1.8.7 and the forthcoming ruby 1.8.8 with a warning option (-w) as a start.

While the official 1.8.7 has a few backported features from Ruby 1.9.1, there are other ways to make use of 1.9.1 features. Very useful are Fibers in 1.9.1, which have been used for some significant scalability improvements to Ruby database adapters. NeverBlock added 1.8.x support with "Poor Man's Fibers" to its library.

Now this port is available in the form of patches against 1.8.6_p287 and 1.8.7_72 :

At Kickball Labs, Aman Gupta ( and I ( [Joe Damato] have been working on an implementation of Fibers for Ruby 1.8.{6,7}. It is API compatible to Fibers in Ruby 1.9, except for the "transfer" method, which is currently unimplemented. This patch will allow you to use fibers with mysqlplus and neverblock.

Rate this Article