On Fri, Jul 24, 2009 at 3:21 PM, Thomas B.<tpreal / gmail.com> wrote: > Apart from that, if you prefer, I can call {[o]=>0}, and not directly > call Array#hash, and I get the same error of course. And now you cannot > say that I try to apply what I read about Object to Array, because now, > from the user point of view, there's simply something wrong, it doesn't > work even though I did everything OK, I redefined o.hash in a way that > is consistent with the reference for Object#hash. And then you'd *still* be talking about Array#hash. >> def o.hash; 89624894967898529964558;end => nil >> a = { o => 1 } # this works! => {#<Object:0x248d6c>=>1} >> a = { [o] => 1 } RangeError: bignum too big to convert into `long' from (irb):23:in `hash' from (irb):23 Just because obj.hash gets called farther down the chain isn't an indication of how anything ought to work. To be clear, I think it's basically a bug, for sure. But I think the bug is that Array#hash doesn't do this truncation trick that Object#hash claims, which doesn't tell me anything about Object#hash's documentation. So I'm not disagreeing with you, I'm just expressing the concern that the issue is probably in Array, not Object. -greg