Last active
September 18, 2018 14:44
-
-
Save coolbrg/73b14d976433295623d653a605bab718 to your computer and use it in GitHub Desktop.
monkey patch
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
# 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