InfoQ

News

Ruby 1.9 released

Posted by Rick DeNatale on Dec 26, 2007 06:00 AM

Community
Ruby
Topics
Performance & Scalability
Tags
Documentation ,
RubyGems ,
Open Source Project Releases ,
Rake
As promised, Ruby 1.9 has been delivered on Christmas 2007.

Previously, a version number for Ruby with an odd minor version number signified an experimental version. So Ruby 1.7 was experimental, while Ruby 1.8 was a production version. The Ruby core team has changed this so that, with the advent of Ruby 1.9.0, Ruby 1.9 is no longer considered experimental, although it may be a while before the implementation becomes ready for production use. Matz has stated that the stability of 1.9 will be improving. The language definition should now be stable, with no further experimental features added. Major Ruby projects, including Rails, have already been working on compatibility with Ruby 1.9. For more on this see below.

Ruby 1.9 brings lots of changes and new features. Many of these will be well-received, such as the new literal hash syntax which among other things lets you do away with the => in calls to methods which take hash arguments, so a call like:
   link_to :controller => 'People', :action => "list" 
can now be written as:
   link_to controller: fred, action: "list" 

The best source for information about the changes between Ruby 1.8 and Ruby 1.9 has long been the list kept by Mauricio Fernandez. Mauricio has been manually tracking the changes for about two years now, and has recently announced that he will soon release a new list which is automatically produced from the subversion change logs.

Also of interest is the fact that some key "external" ruby tools such as Ruby Gems, and Rake are now part of the standard library.

Probably the biggest change is inside. Ruby 1.9 is implemented on top of YARV a Ruby virtual machine which is much more efficient than the old abstract syntax tree (AST) interpreter used in earlier implementations by Matz's team. YARV also brings changes for concurrency: Ruby now uses kernel threads (albeit Ruby code won't run in parallel due to a Global Interpreter Lock) and Fibers update Continuations and bring Coroutines to Ruby.

On the other hand, Ruby 1.9 is not completely backward compatible with Ruby 1.8. Some of the semantics have changed. For example, block arguments are now local to the block, and there are subtle changes to block semantics.The changes mean that many existing Ruby programs will need some amount of conversion to take advantage of Ruby 1.9.

The Ruby book publishers are hard at work. The Pragmatic Programmers recently announced that a new, third, edition of "Programming Ruby" a.k.a. the "Pickaxe", is in the works, as is their normal practice the Pragmatics have made this available under a beta program.
O'Reilly has also announced that  "The Ruby Programming Language", by David Flanigan and Yukihiro Matsumoto, is expected to be released in January 2008. This will be a greatly expanded version of Matz's "Ruby in a Nutshell" updated to cover Ruby 1.9. 

No comments

Watch Thread Reply

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.