fix case statements for ruby 2.0