InfoQ

News

Ruby 1.9 released

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

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

Reply

Exclusive Content

Business Natural Languages Development in Ruby

Jay Fields presents his concept of Business Natural Languages - a type of Domain Specific Languages geared towards being readable by domain experts.

Distributed Version Control Systems: A Not-So-Quick Guide Through

Adoption and interest for Distributed Version Control Systems is constantly rising. We will introduce the concept of DVCS and have a look at 3 actors in the area: git, Mercurial and Bazaar.

Segundo Velasquez and Agile as Seen Through the Customer's Eyes

Deborah Hartmann interviewed Segundo Velasquez about his experience as customer with an Agile team during the initial phase of software design of a product.

Fine Grained Versioning with ClickOnce

David Cooksey shows how to fine grained versioning to a ClickOnce deployment using an HttpHandler written with ASP.NET, making partial rollouts to a test audience much easier.

Implementing Manual Activities in Windows Workflow

Windows workflow (WF) is an excellent framework for implementing business processes, but lacks support for human activities. This article describes a completely generic approach for changing this.

Markus Voelter about Software Architecture Documentation

In this interview taken during OOPSLA 2007, Markus Voelter talks about the importance of documenting the software architecture, and gives some good and also bad examples on how it could be done.

Voca, UK's largest payment processing engine running Spring

William Soo and Meeraj Kunnumpurath discuss the Voca transaction processing system, architectural challenges and requirements, Voca's Spring/J2EE architecture, and the future SEPA architecture.

Patterns for securing architectures

Security is about trade-offs. Only a few have the expertise to design good security. This talk focuses on Security Patterns, such as Role-based Access Control, Single Access Point, and Front Door.