Hi, At Wed, 6 Jun 2007 03:48:02 +0900, David Flanagan wrote in [ruby-core:11408]: > > A proc is more than just its body. > > I understand. My point is that the Proc.== documentation says: > > Return +true+ if _prc_ is the same object as _other_proc_, or if > they are both procs with the same body. > > To me, this implies that you can use == to compare the body of two > separate proc objects. I couldn't come up with any case where you could > actually do this. Nobu pointed out that when two procs have empty > bodies, == works for comparing them, but so far, there are no other > cases in which the documentation matches the implementation. It may be changed in 1.9, because a Proc doesn't behave as a Binding right now. Although I'm still not sure if this difference is intentional, it may be possible to improve the comparison. -- Nobu Nakada