Recent Posts by bloritsch

Subscribe to Recent Posts by bloritsch 2 post(s) found

11 Sep, 2009 02:10 PM
Avatar bloritsch 2 posts

Topic: isitruby19.com / Watir gem installation

Ruby 1.9 enforced the original intent for case statements. The syntax is supported in 1.8, along with the variation that everyone seems to use (at least everyone with a C/C++/C#/Java background). The case statement should be written like this:

case(var) when 0 then
  1. do something
    end
    end

If you replace the colons after the value on the “when” lines with the word “then” the code should work. Submit a bug report to the watir folks to have them fix the case statements for the next version of the library. The “when X then” pattern works in 1.8, and is forward compatible so there shouldn’t be too much drama with it.

 
10 Sep, 2009 01:04 PM
Avatar bloritsch 2 posts

Topic: isitruby19.com / Tips for Windows Users

Some of the gems require native compilation, so poor Windows users have been at the mercy of gem makers to supply pre-compiled gems. This is a difficult proposition particularly when you are testing for compatibility with Ruby 1.9.

The folks at Ruby Installer (makers of the one-click ruby installer for Windows) have an elegant solution. In their http://rubyinstaller.org/addons.html page they have a “DevKit” that includes GCC and Mingw utilities to compile the native C components.

Compilation is slow, particularly compared to OS-X and Linux boxes. (Maybe make this sticky?)