Ruby 1.9 is expected to be released at the end of this year
and although it's a moving target, moriq (Kazuhiro
Yoshida) is trying to make Rails run on it. Even if you don't care about Rails
on 1.9, there's a moral to this story. If you have any sizeable amount of code
which might have to run on 1.9, your best allies are:
- defensive programming: get rid of all those warnings now, use "future-proof" variants (like module_eval{ define_method(...){ } } instead of klass.send(:define_method, ...){ ... })
- unit tests!
In addition to Rails' base libraries (ActiveRecord, ActionPack, ActiveSupport),
moriq has been working on other libs/apps needed for Rails development:
- rake
- rubygems
- sqlite-ruby3/sqlite-ruby
You can find his Rails branch (based on 1.2) at
http://dev.moriq.com/svn/local/rails/trunk/ .
moriq has been blogging about his feat
from day one (in Japanese), and
he's logging the progress of the unit tests
as he proceeds. ActionPack is but 1 failure away from green, ActiveRecord 7
and ActiveSupport 6 failures + 6 errors (but several are related to his
non-UTC timezone). Rake looks much worse, since
it segfaults.
Read more...
Read: Towards compatibility with Ruby 1.9: Rails, Rake, RubyGems...