Skip to content

Instantly share code, notes, and snippets.

@forresty
Created August 12, 2011 13:52
Show Gist options
  • Save forresty/1142072 to your computer and use it in GitHub Desktop.
Save forresty/1142072 to your computer and use it in GitHub Desktop.
Break the math!
#!/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