Home arrow Ruby-on-Rails arrow Ruby 2.0 Prepped for February 2013 Release
RUBY-ON-RAILS

Ruby 2.0 Prepped for February 2013 Release


Ruby programmers received some exciting news on the same day that general elections were held here in the US. Ruby 2.0.0 got an immediate feature freeze, which means that this version will be released soon. Indeed, Yusuke Endoh, Ruby 2.0's release manager, revealed its targeted release date: February 24, 2013.

Author Info:
By: Terri Wells
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
November 07, 2012

print this article
SEARCH DEVARTICLES

Ruby programmers received some exciting news on the same day that general elections were held here in the US. Ruby 2.0.0 got an immediate feature freeze, which means that this version will be released soon. Indeed, Yusuke Endoh, Ruby 2.0's release manager, revealed its targeted release date: February 24, 2013.

If that date sounds familiar, it's because the language will be turning 20 – which, as Mirko Stocker  pointed out, makes it particularly appropriate as the release date for Ruby 2.0. If you're a Ruby programmer, you can look forward to a lot of welcome changes that will allow you to do much more with the language.

So what's new in Ruby 2.0? Plenty, though the biggest changes for most programmers come under the heading of keyword arguments and refinements. Let's look at keyword arguments first. With this protocol, you'll be able to do more than just pass a hash as a method argument. You can find some examples of keywords arguments in action as they would look in Ruby on a test page. While Ruby will now offer full support for keyword arguments, this new feature of the language will only work for arguments that have a default value.

Now we'll move on to refinements. Yehuda Katz, a member of the Ruby on Rails core team, wrote a blog post just under two years ago that explains how they work in practice. He explained that their purpose “is to make it possible to extend core classes, but to limit the effect of those extensions to a particular area of code.” The point of refinements is to make monkey-patching safer. For example, users will be able to make certain kinds of extensions to their own code, safe in the knowledge that they won't affect any other Ruby code.

Katz sums up this point at the end of his post, expanding on what refinements can do: “In my opinion, the most important feature of refinements is that you can see the refinements that apply to a chunk of code (delineated by a physical body class). This allows you to be sure that the changes you are making only apply where you want them to apply, and makes refinements a real solution to the general problem of wanting aesthetically pleasing extensions with the guarantee that you can't break other code. In addition, refinements protect diligent library authors even when other library authors (or app developers) make global changes, which makes it possible to use the feature without system-wide adoption. I, for one, am looking forward to it.”

As I mentioned earlier, these aren't the only new features coming to Ruby 2.0, but they may be the most significant. Yusuke Endoh noted that “Of course, the performance has also much improved. This might be the most interesting change for those not interested in new features.”

Will all Ruby 1.9 programs be able to run in Ruby 2.0? That's an open question, though it looks like the transition will be easier than it was from 1.8 to 1.9. Yusuke Endoh notes that “there are indeed a few small incompatibilities.” You may want to download the Ruby 2.0.0 release candidate to check it out in full.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

All Ruby-on-Rails Tutorials
More By Terri Wells


blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Ruby-on-Rails Faces Second Security Flaw in ...
- Ruby 2.0 Prepped for February 2013 Release
- Why LinkedIn Switched from Ruby on Rails
- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials