Ruby 2.0.0

Summary

Ruby 2.0.0 is the latest stable version of Ruby, with major increases in speed and reliability. With this major update from Ruby 1.9.3 in Fedora 18 to Ruby 2.0 in Fedora 19, alongside JRuby, Fedora becomes the superior Ruby development platform.

Owner

Current status

Detailed Description

Ruby 2.0.0 is upstream's new major release of Ruby. It caries new features such as:

Refinements

Keyword arguments

Enumerable#lazy

Module#prepend

#to_h: Convention for conversion to Hash

%i: a literal for symbol array

regexp engine was changed to Onigmo

DTrace support

TracePoint

Yet, it is source level backward compatible with Ruby 1.9.3, so your software will continue to work.

The updated Ruby also provides better integration with Fedora, especially JRuby. But not only JRuby, it is also one step closer to be prepared for other interpreters, such as Rubinius. Provided custom Ruby loader with working name "rubypick" [1] will allow to easily switch interpreters executing your script, provides fallback to whatever Ruby interpreter is available on you system, yet still keeps backward compatibility with all your Ruby scripts.

Benefit to Fedora

Supporting the growth of a Ruby language with a latest release supporting the newest language features, which enables even faster and easier development of Ruby applications. Add to that the multiplatform targetted development we enable downstream parties to do using our distribution.

Scope

The following list includes a summary of changes included in this feature:

New Packaging Guidelines for Ruby packages (different virtual provide semantics, native extensions moved into different directory). This has to be done in sync with JRuby related changes to packaging guidelines.

Rebuilding of all Ruby packages, and all packages depending on Ruby

Changes to the search path to comply with the multi-versioning

New Packaging Guidelines

Drafts of new packaging guidelines will have to be proposed to FPC. You can see the current draft.

Packages that require "*ruby*"

Requires rebuilding numerous packages that depend on ruby. All these packages have to be updated to support new virtual provides.

Use the packages, ideally with your applications previously written in Ruby (be sure to upgrade your applications to Ruby 2.0.0 first).

If something doesn't work as it should, let us know (specifically, concentrate on correct load paths, encodings, changes in binary extensions and also other new features added between 1.9.3 and 2.0.0).

User Experience

The Ruby programmes/scripts should behave as they were used to. However, you might notice faster startup due to improvements of require performance and in some use-cases lower memory footprint, since Ruby's garbage collector is now COW friendly.

Dependencies

Ruby has more than 450 dependencies in Fedora, most of them are Rubygems. All of these 450 will have to be rebuilt and tested.

Contingency Plan

We would like to get a special buildroot tag to be able to rebuild all the packages with Ruby 2.0.0. If anything goes wrong, the tag could be easily dropped and previous version of Ruby 1.9.3 and its dependencies stays intact. The tag would be merged into F19 right before branching.

Documentation

Release Notes

The Ruby 2.0.0 breaks ABI compatibility with previous version of Ruby, therefore soname was bumped. All RubyGems which use binary extensions should be rebuilt. All applications which use Ruby binding should be rebuilt. Nevertheless, since upstream payed great attention to source compatibility, no changes to your code are needed.

RubyGems with binary extensions now use different directory structure, to provide better compatibility with JRuby and other interpreters. All libraries need to be adjusted to this change. This change is reflected in new packaging guidelines draft.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks or registered trademarks of
Red Hat, Inc. or its subsidiaries in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community
maintained site. Red Hat is not responsible for content.