Eric Crampton <EricCrampton / worldnet.att.net> 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