From: Robert Klemme Date: 2004-03-01T18:59:46+09:00 Subject: Re: UnboundMethod#hash apparently broken in 1.8.1 "Yukihiro Matsumoto" schrieb im Newsbeitrag news:1078045709.093139.10759.nullmailer@picachu.netlab.jp... > Hi, > > In message "Re: UnboundMethod#hash apparently broken in 1.8.1" > on 04/02/29, "David A. Black" writes: > > |> UnboundMethod#hash is broken in > |> $ ruby --version > |> ruby 1.8.1 (2003-12-25) [i386-cygwin] > |> > |> Is that fixed in a later version? > | > |I'm not sure why you're describing it as broken. Can you explain > |further? > > If Robert is claiming two hash values are different where two values > are equal (by "=="), it's not a bug, because Hash uses "hash" to get > hash values, and uses "eql?" to compare, not "==". Ok, the behavior is consistent then. In that case I'd say #hash *and* #eql? should be changed. Or is there a reason why we shouldn't use UnboundMethod as a hash key? To me the example with the additional meta data for methods made perfectly sense. Regards robert