Ruby 1.9.2-p290 Released: The Lowdown on Ruby’s Latest Production Release
Over at the always-riveting official Ruby blog, Shota Fukumori has announced the release of Ruby 1.9.2-p290, the latest 'patchlevel' release of the current production release of Ruby MRI.
If you're still on 1.8, check out The Ruby 1.9 Walkthrough, a mega screencast aimed at Ruby 1.8.7 developers who want to learn all about what's new, what's gone, and what's different in Ruby 1.9.2 and 1.9.3.
Patchlevel 290 is the first production-level patchlevel release of MRI since patchlevel 180 back in February so it's worth upgrading if you're on 1.9.2. The release post duly notes:
This release doesn't include any security fixes, but many bugs are fixed in this release.
So what changed? And how can you upgrade? Let me spill the beans.
What's Changed From p180 to p290?
Quite a lot got changed in terms of the numbers. 132 files were tweaked with a total of 3505 lines added and 788 taken away.
A selection of the fixes:
require 'date'; Date.new === nilthrows an undefined method error for coerce on p180 - this has now been fixed
- The Thread.kill segfaults when the object to be killed isn't a thread bug has been resolved.
- Tweaks to reduce segmentation faults when using zlib on x86-64 Darwin (OS X) - always good
- Modification to prevent random number sequence repetition on forked child processes in SecureRandom
- Fix to io system to resolve a Windows-only bug where characters are being read incorrectly due to ASCII not being treated as 7 bit
- A tweak to Psych (the YAML parser) to plug a memory leak
- Load paths are now always expanded by rb_et_expanded_load_path (I think this might yield a performance gain?)
- Fixes to Psych's treatment and testing of string taint
- Prevention of temporary objects being garbage collected in some cases
- Fixes to resolve compilation problems with Visual C++ 2010
- A fix so that Tk's extconf.rb would run successfully
- Lots of Tk related fixes generally - I'm guessing Tk is very popular amongst the core team, particularly in Japan, because it seems to be a common release blocker.
- A fix to string parsing to resolve an obscure symbol-containing-newlines parsing bug
How To Upgrade to Ruby 1.9.2-p290
If you're on Windows, RubyInstaller 1.9.2-p290 has been released.
If you compile your own version of Ruby, just grab one of the archive files listed in the official post and do your usual compilation shuffle. Nothing new there.
If you're an RVM user, you'll be glad to know the RVM team were on the ball and released an update within hours to support p290. Your upgrade steps are:
rvm get head rvm reload
At this stage, you can either run
rvm install ruby-1.9.2-p290 to install p290 from scratch, or if you're already running p180 and wish to upgrade your existing environment, run
rvm upgrade ruby-1.9.2-p180 ruby-1.9.2-p290 and you're cooking with gas.
Some users have noticed that running
rvm upgrade as above got an error where the wrong RVM executable was being run, but it seems to resolve itself if you open a fresh shell (despite running
rvm reload) so try that out if you hit the "Unable to install" error.