Ruby: Perfect for 1984
We’re proud to bring you this time wasting tidbit: how to make 2 + 2 = 5.
class Fixnum alias_method :add, :+ def +(n) if self == 2 && n == 2 5 else add(n) end end end
We’re proud to bring you this time wasting tidbit: how to make 2 + 2 = 5.
class Fixnum alias_method :add, :+ def +(n) if self == 2 && n == 2 5 else add(n) end end end