Dave Thomas <Dave / PragmaticProgrammer.com> writes: > > Why do the following evaluate to false? > > > > f.method(:bar) == f.method(:bar) > > f.method(:bar).to_proc == f.method(:bar).to_proc > > Neither class Method nor class Proc implement '==', so it defaults > to Object's version of ==, which tests based on object identity. I understand this, but is there any way to actually compare two Method objects correctly? I suppose one work around is to store a pair which contains the object identity and the method as a string and use send, but using Method like I tried above would be more elegant. Any ideas?