BT

InfoQ Homepage News Releases: JRuby 1.1.2; New Preview of Ruby 1.8.7

Releases: JRuby 1.1.2; New Preview of Ruby 1.8.7

This item in chinese

Bookmarks
Just in time for RailsConf 2008JRuby 1.1.2 was released  (download JRuby 1.1.2 versions).  This maintenance release in the 1.1.x branch consists of bug fixes and some major performance increases.

The startup performance boost (reported previously), is based on the idea to put JRuby .jar files into the bootclasspath - loading classes from the bootclasspath than from the regular classpath is faster because the bytecode doesn't get verified.

Another Ruby runtime release is available in the stable Ruby 1.8.x branch of MRI. Ruby 1.8.7 preview 4 has been released. You can see a rough list of features and API added since 1.8.6 or the full Changelog for MRI.

A quick diff of the new features in Ruby 1.8.7 preview 4 and previous previews, shows some activity and some previously introduced features disappeared and changed again.

A big change is the re-appearance of Symbol#to_proc. The feature made it's first appearance in Ruby 1.9. Ruby 1.8.7 preview 1 included a backported version - which was quickly discovered to break software using their custom versions of Symbol#to_proc, in particular Rails.  This caused the feature to be pulled - and now it's back, after the behavior was changed to comply with the test suite. As it seems now, Symbol#to_proc seems to be here to stay in Ruby 1.8.7.

Here's a list of further API changes not mentioned previously:
  • Binding#eval
  • __method__  which returns the name of the current method as a Symbol
  • String#bytesize returns the size of the string in bytes
  • Object#instance_exec
The behavior of a few APIs was changed, which might cause some applications to break:
  • Date.parse was changed so that  '##.##.##' is now interpreted as 'YY.MM.DD'  instead of 'MM.DD.YY'.
  • String#to_i, String#hex and String#oct changed the behavior for the underscore '_' character in number strings, eg '1__0'.to_i in Ruby 1.8.6 was turned into '10', but in Ruby 1.8.7 it is turned into '1'. See the release notes for a more complete overview.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.