On 2/13/07, Marcello Barnaba <bofh / softmedia.info> wrote:

> but I do not understand why:
> >> [lambda{}.object_id, lambda{}.object_id]
> => [-606913178, -606913188]
>
> and:
> >> lambda{} === lambda{}
> => true
>
> ? rdoc says that Proc uses Module's ===, shouldn't that check for object
> identity? what's going on?

Hmm, where does it say that?  Module#===(obj) checks that
obj.is_a?(self), not obj.equal?(self), which doesn't really make sense
to me for Proc objects.

Looks like Proc#=== falls back to Object#===, which in turn calls #==,
i.e., Proc#==.  Whee!

Regards,
George.