BT

Ruby 1.9 Roundup: Ruby-debug on 1.9, Ruby Switcher, MacRuby

by Werner Schuster on Aug 08, 2009 |

Yehuda Katz recently asked what problems kept developers off Ruby 1.9. A big reason is the long list of libraries and tools that don't work with Ruby 1.9.x.
This list is steadily shortened, though, recently with the release of ruby-debug for Ruby 1.9.x. Ruby-debug uses native extensions to reduce the overhead of running Ruby code under the debugger.
Mark Moseley, the developer behind the port, recently released the code on GitHub, and is now working on reducing the debugger overhead even further. The basic idea is to set a breakpoint in Ruby code by putting a special instruction in the compiled Ruby code at the position where execution should stop.
The installation instructions for ruby-debug 1.9.x are available at GitHub.

Testing Ruby code on different Ruby implementations gets more important. There are options like MultiRuby or the Ruby versions site.
A new tool is Ruby Switcher. The idea is simple: a simple command switches the Ruby version, ie. use_ruby_191 switches to Ruby 1.9.1, whereas use_jruby makes the ruby and other binaries point to JRuby versions. The tool also comes with support for downloading and installing a list of Ruby versions.

Finally, MacRuby's experimental branch has been merged into trunk. The experimental branch introduced a new VM that uses LLVM for JIT and Ahead of Time (AOT) compilation. Another change was the removal of the GIL. MacRuby was forked off Ruby 1.9.x and inherited it's threading behavior, including the GIL.
It'll be interesting to see how MacRuby's threading performance fares in the next stable release; standard Ruby 1.9.x will probably retain he GIL in the near future.

Hello stranger!

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

Get the most out of the InfoQ experience.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT