Skip to content

Instantly share code, notes, and snippets.

@coolbrg
Last active September 18, 2018 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coolbrg/73b14d976433295623d653a605bab718 to your computer and use it in GitHub Desktop.
Save coolbrg/73b14d976433295623d653a605bab718 to your computer and use it in GitHub Desktop.
monkey patch
# Concept is called Monkey Patch
class Integer
def +(n)
self * n
end
end
# Now try 10 + 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment