Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Ruby 1.9.1 Preview Released: Why This Is A Big Deal

By Peter Cooper / October 29, 2008

ruby19.pngIn an understated post on the official Ruby blog last night, Yugui (Yuki Sonoda) announced the release of Ruby 1.9.1-preview 1.

Why To Get Excited

A preview release? Why is this a big deal? A few reasons why Ruby 1.9.1 is significant, even as a preview release:

  • Ruby 1.9.1 will be the first stable, production-ready release of the much anticipated Ruby 1.9 series.
  • The Ruby 1.9 branch is the cornerstone of Ruby's future. Much as PHP 5-style code is replacing PHP 4-style code, Ruby 1.9's idioms and style will eventually reign (even if it takes a few years).
  • As of Ruby 1.9.1-preview 1, the language features and changes are effectively "frozen." Changes to standard libraries for multilingual features are likely to continue, however.
  • Ruby 1.9.1-preview 1 allows you - as a developer - to test your code and libraries on what will eventually become the "default" Ruby.

On that last point, as Dave Thomas says in his release summary:

If you are the maintainer for any publicly available Ruby code (be it a Gem, an application, or whatever) I strongly urge you to download this preview. You'll be doing the community a great service in two ways. First, the various incompatibilities between 1.9 and 1.8 mean that there's a chance that your code may not work without some tweaks. Making those changes now will help others using your code.

Getting Ruby 1.9.1-preview 1

You can get Ruby 1.9.1-preview 1 in source form from the official FTP site at or via HTTP from

If you find the server slow - as I do - I've made the .tar.gz available here from Amazon S3, so you should be able to download it at full speed.

Ruby 1.9 Resources

When Ruby 1.9 was still quite new, James Edward Gray wrote the excellent "Getting Code Ready for Ruby 1.9." Much of it is still very relevant.

Almost a year ago, Sam Ruby wrote a comprehensive set of notes on porting REXML to Ruby 1.9.

Mauricio Fernandez's gargantuan "Changes in Ruby 1.9" is still an excellent reference.

Got any Ruby 1.9 migration tips or tricks of your own? Please, leave a comment!

Supported by: ActionGear is a menu-bar app for task management on your Mac. It's lightweight, quick, and helps you get stuff done. Try it out for free.


  1. Justin Halsall says:

    Is it possible to run rails on ruby 1.9.1?

  2. Michael Morin says:

    Rails 2.2 will run on Ruby 1.9. I don't know about the current versions of Rails.

  3. Mathijs Kwik says:

    @Justin: I believe it is, at least rails 2.2 if I'm correct. But quite some gems/plugins aren't ready yet, so it really depends on your gem-needs.

  4. Difei says:

    with rails > 2.2.0, may be.

  5. Daniel Berger says:

    Production ready, my a$$. You'd have to be fscking nuts to run any 1.9.x branch in production use at this point. When it's officially dubbed 2.0 then, and only then, should you even remotely consider using it for production.

  6. Alex says:

    From what I understand, 2.0 will be further off than previously reported and including even more new features, and 1.9.1 will be the stable version for 1.9. At least, that's what Matz told us at LoneStar Ruby Conf this year...

  7. Beoran says:

    This is very great, I tried it and it speeds up my Ruby/SDL game by 100%. :)

    However I would like to send an important message to all people who are writing Ruby extensions using the C API: update your code. Check for any place where you use RArray *arr; arr->ptr and arr->len. Now, it's not possible to use these anymore, you must use RARRAY_PTR(arr), and RARRAY_LEN(ary), like you should have. I've seen this problem several times now, and I think it's due to the fact that many people didn't know that directly using RArray was deprecated, even in ruby 1.8.6.

  8. Dor Kalev says:

    running some tests on 1.8 vs. 1.9.1 :

    the testing function:

    def prof(t = 1)
    starting_time =
    t.times { yield }
    dlta = ( - starting_time).to_f/t
    puts "time: #{dlta.to_s}(s) . req/s: #{(1/dlta)}"

    prof(100) {a = (1..10000).collect { |i| i* 2}}
    1.8: time: 0.02187848(s) . req/s: 45.707014381255
    1.9: time: 0.00216260594(s) . req/s: 462.405092626352

    a = (1..10000).collect { |i| i* 2}
    b = (5000..15000).collect { |i| i* 2}
    prof(1000) {a & b}
    1.8: time: 0.00321087(s) . req/s: 311.442070217729
    1.9: time: 0.004361395498(s) . req/s: 229.284411482189

    Ruby 1.9 showed amazing speed increase on many other parameters, that's true. I'm sure that in general it will boost performance amazingly. Yet I guess it can be even better.

    (Thanks Boris (Peterbarg) for helping on this one!)

Other Posts to Enjoy

Twitter Mentions