Skip to content

Instantly share code, notes, and snippets.

@sj26
Created October 19, 2010 07:46
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 sj26/633794 to your computer and use it in GitHub Desktop.
Save sj26/633794 to your computer and use it in GitHub Desktop.
Checking alias eqivalency
class A
def a
end
def b
end
alias c b
end
A.instance_method(:a) == A.instance_method(:b)
#=> false
A.instance_method(:b) == A.instance_method(:c)
#=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment