1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Top 5 New Features in Ruby 1.9

By

The 1.9 release of Ruby brings forth a number of changes. Some of them are minor, some not so minor. So which ones do you need to know about? Here are 5 new features worthy of your attention.

  • YARV - Yet Another Ruby VM

    Ruby 1.9 has a completely new execution environment called YARV. This replaces Matz's interpreter (MRI) and gives you some significant performance enhancements.

  • Fibers

    Fibers are like little sub-programs that can be run, paused and resumed at any time. They provide a thread-like interface for very little RAM.

  • Named Regexp Groups

    Named regexp groups provide a mechanism to store snippets of regexp in named groups and recall them later in the regexp. Think of them as regexp methods or subroutines. They also show up in the capture group hash, and can be referred to by name outside of the regexp.

  • The Lambda Operator

    Lambdas have been around forever in Ruby, but now they have an all new operator (the 'stab' operator) and new argument semantics.

  • RubyGems and Rake are Merged with Ruby

    Both the RubyGems and Rake projects have been merged with Ruby. This makes it much easier to install Ruby and easier to manage potentially differing versions of Ruby, RubyGems and Rake.

  1. About.com
  2. Technology
  3. Ruby
  4. Beginning Ruby
  5. New in Ruby 1.9.x
  6. Top 5 New Features in Ruby 1.9

©2014 About.com. All rights reserved.