Skip to content

Instantly share code, notes, and snippets.

@burningTyger
Created January 11, 2012 22:42
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 burningTyger/1597225 to your computer and use it in GitHub Desktop.
Save burningTyger/1597225 to your computer and use it in GitHub Desktop.
# 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