Fixed case statement syntax for Ruby 2