From: Mark Hubbart Date: 2004-03-03T04:45:07+09:00 Subject: Re: UnboundMethod#hash apparently broken in 1.8.1 On Mar 1, 2004, at 3:57 PM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: UnboundMethod#hash apparently broken in 1.8.1" > on 04/03/02, Mark Hubbart writes: > > |To me, at least, this behavior is unexpected. I would expect it to > |return the same object each time; or at least objects with the same > |hash value. > > I think you're expecting too much. ;-) > I'm curious why you expect so. I would expect it to work that way because both UnboundMethods are pointing at the same exact method. Perhaps I am expecting too much, since I don't know how it works internally. But, from the outside, I expected it to essentially make another reference to that method's object and pass it back. I'm guessing (from your reaction) that what actually happens behind the scenes when you retrieve an UnboundMethod that way is entirely different from what I had assumed? If, in retrieving the UnboundMethod object, it creates a new wrapper object, and passes that back, it would make perfect sense that the hashes and ids wouldn't match. Even so, I wish they would match :) Of course, I'm only inferring, so I could easily be way way out in left field here. --Mark