Created
January 11, 2012 22:42
-
-
Save burningTyger/1597225 to your computer and use it in GitHub Desktop.
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
# as seen in time19.rb | |
def respond_to_missing?(method, *) | |
method == "succ" || super | |
end | |
def method_missing(method, *args, &block) | |
if method.to_s == "succ" | |
self +1 | |
else | |
super | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment