Skip to content

Instantly share code, notes, and snippets.

@nertzy
Created November 10, 2010 19:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nertzy/671370 to your computer and use it in GitHub Desktop.
>> def foo; __method__; end
=> nil
>> foo
=> :foo
>> alias bar foo
=> nil
>> bar
=> :foo
>> method(:bar)
=> #<Method: Object#bar>
>> method(:bar).name
=> "bar"
>> method(:bar).call
=> :bar
>> bar
=> :foo
>> def foo; method(:bar).call; end
=> nil
>> foo
=> :bar
>> bar
=> :foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment