updated case syntax for Ruby 1.9