fix Ruby syntax error x=case o=when