InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Ruby 1.9 released

Posted by Rick DeNatale on Dec 26, 2007

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

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?