def cond(c, a, b) if c then return a return b end の間違いだと思われる。