fixed breaking when clause for ruby 1.9.3