InfoQ

News

Ruby 1.9 released

Posted by Rick DeNatale on Dec 26, 2007

Community
Ruby
Topics
Performance & Scalability
Tags
Rake ,
Documentation ,
RubyGems ,
Open Source Project Releases
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

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.