Ruby 1.9 Compatibility

The case statement changed in ruby 1.9