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

Ruby 1.9 Is Released!

By Peter Cooper / December 28, 2007

Yukihiro Matsumoto (a.k.a. Matz) has announced the release of Ruby 1.9.0. Ruby 1.9 is a development release of Ruby, so don't expect to switch all of your production applications over to it. Indeed, Ruby 1.8 is officially still the stable choice (pending further news), so tread with caution and don't expect miracles. For the impatient, the main download is available straight away from ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz

Following tradition, the new version of Ruby was released over the public holiday period (Ruby 1.8.4 was released on December 24, 2005, for example), and one of the biggest changes has been the move to a new virtual machine (YARV) that yields significant performance improvements over the 1.8.x versions. As always, the best resource for learning about the new features of Ruby 1.9 is the superb Changes in Ruby 1.9 by Mauricio Fernandez.

Even though the announcement was just in the last couple of days, some quick shooters have already posted about Ruby 1.9. Here's some bedtime reading for all you eager readers:

Ruby 1.9 - Right for You? (A good look at whether Ruby 1.9 is going to suit you or not, by Dave Thomas)

Testing both Ruby 1.8 and 1.9 using MultiRuby

Xmas Gift: Ruby 1.9 Coverage!

Some sort of Japanese interview with Matz about Ruby 1.9 (posted primarily for the great pictures of Matz)

It will be interesting to see all of the various library compatibility issues come out in the wash over the next few weeks, and I'd expect new versions of most of your favorite libraries to be coming out too.. so expect interesting times in Ruby land over the next couple of months! Lastly, congratulations to Matz and the rest of the Ruby core team, but particularly Koichi Sasada for all of his work on the YARV virtual machine that has revolutionized Ruby's performance.

Comments

  1. Sean O'Neil says:

    Wow. It's pretty broken on Windows. Am I just about the only Windows programmer who uses Ruby? ;-)

    Seriously, mkmf.rb is broken (I tried to fix the various pathing issues, but eventually gave up), so I can't get any C/C++ extensions to build at all. When I try to embed ruby in a C/C++ program, it crashes when I try to call rb_eval().

    The core Ruby language is great, but as I write and test my own Ruby extensions, I sort of need to be able to compile them to really give 1.9 a try.

  2. Luis Lavena says:

    @Sean: no, you aren't the only one.

    But let me guess, you're compiling extensions with VC8, and using the pre-built VC6 version of 1.9.0?

    Nice mix (ala: don't do that, for your mental health) ;-)

    I build 1.9.0 with VC6/VC8 and even MinGW without the issues you describe. (This also is true for 1.8).

    I'll love see some true "bug report" of this to ruby-core, and we can see how to fix it (if it's broken, of course).

    Regarding embedded ruby, you should take care of few things regarding rb_eval() being used from another thread that's not the one who created the interpreter...

  3. FrankLamontagne says:

    That's great news! At first glance I was wondering if the fact that :

    "hello".asdfsd rescue 1

    will not go in the rescue clause anymore would create some confusion. But now I'm pretty confident that it was a very smart move. It makes perfect sense when you think about it. We don't want the interpreter to catch exceptions that are located on the levels "above" of what we're trying to rescue.

    I think I like the new hash notation ala javascript :

    {a: "foo"} # => {:a=>"foo"}

    but I'm still unsure if I'm going to use it... the traditional form makes it crystal clear that the first element is a symbol, that the second one is a string and that together they represent a key/value pair in a hash. But still I admit it's a nice shortcut.

    Congrats to Matz and his team as well as Koichi Sasada for this great piece of work. Can't wait for the first stable version!

  4. Sean O'Neil says:

    @Luis:

    1) I'm compiling everything from scratch using VS 2005. First I build Ruby 1.9, which works ok as long as I have zlib in my path (for rubygems, which is no longer an extension). Then I try to build any number of extensions using the same compiler, and I get errors from mkmf.rb about finding ruby.h. I fixed that error, ran into others, and gave up on it for now.

    2) I posted a bug report on the rb_eval() call on Windows in 1.9, and it's been assigned to Matz. You can find the details here:
    http://rubyforge.org/tracker/?func=detail&atid=1698&aid=14028&group_id=426

    3) Not only do I know about the threading issue, but I partially fixed it in my own personal build of Ruby so I can initialize Ruby, use it, and blow it away from multiple threads in the same process.

  5. Sean O'Neil says:

    @Luis: Woops, forgot to add that I haven't tested the rb_eval() call since the date I posted it (so it might work in the latest build), but I figured they would've closed the issue if they had fixed it.

  6. Dag Fjeld Edvardsen says:

    A google translation of the Matz interview:
    http://translate.google.com/translate?u=http%3A%2F%2Fwww.atmarkit.co.jp%2Fnews%2F200712%2F25%2Fruby.html&langpair=ja%7Cen&hl=en&ie=UTF8

Other Posts to Enjoy

Twitter Mentions