PaaS company Heroku doesn’t do conferences like the rest of the software industry. Waza, Heroku’s developer conference in San Francisco last week, opened with traditional Japanese music, Taiko drums, and the writing of the word “Waza” on a banner in Katakana. Riding in on all of this Japanese pomp and circumstance was the creator of Ruby, on hand to discuss the new version of that programming language.
Officially released on Feb. 24, Ruby 2.0 is the culmination of a decade’s worth of work by Yukihiro Matsumoto, the language’s creator and chief architect of Ruby at Heroku.
“Some of the fundamental features, like keyword arguments and enabling method combination and refinements for monkey-patching, all of them are presented as I explained in the keynote speech in RubyConf in 2003,” said Matsumoto. “That was 10 years ago, so the basic idea was in mind for 10 years.”
(Monkey-patching is the term for modifying runtime code in a dynamic language program without modifying the actual source code. In other words, it’s slapping fresh code on an already running application, without writing said changes into the source code.)
Yehuda Katz, member of the Ruby on Rails and jQuery Core teams, explained the changes in a blog entry about these refinements. In it he wrote, “The first thing you need to understand is that the purpose of refinements in Ruby 2.0 is to make monkey-patching safer. Specifically, the goal is to make it possible to extend core classes, but to limit the effect of those extensions to a particular area of code.”
Elsewhere in Ruby 2.0, Matsumoto added named arguments, selector namespaces, and multiple inheritance. The Ruby interpreter was also improved, with sandboxed virtual machines, better compatibility with non-Unix environments, and better overall performance.