From: Dave Thomas Date: 2001-04-04T22:40:05+09:00 Subject: [ruby-talk:13480] Re: Method and Proc equality Eric Crampton writes: > I'm using ruby 1.6.3 (2001-03-19) [i686-linux]. Given the following > code: > > class Foo > def bar > end > end > > f = Foo.new > > 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. Dave