Created
August 12, 2011 13:52
-
-
Save forresty/1142072 to your computer and use it in GitHub Desktop.
Break the math!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class Fixnum | |
alias :original_add :+ | |
def +(another) | |
original_add(another).original_add(1) | |
end | |
end | |
puts "1 + 1 = #{1+1}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment