Skip to content

Instantly share code, notes, and snippets.

@banister
Created March 6, 2013 12:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banister/5099071 to your computer and use it in GitHub Desktop.
Save banister/5099071 to your computer and use it in GitHub Desktop.
[1] pry(main)> class Hello
| def hello
| [__method__, __callee__]
| end
|
| alias_method :new_hello, :hello
| end
=> Hello
[2] pry(main)> Hello.new.hello
=> [:hello, :hello]
[3] pry(main)> Hello.new.new_hello
=> [:hello, :new_hello]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment