From: Charles Oliver Nutter Date: 2011-04-13T21:23:14+09:00 Subject: Re: Hash Surprises with Fixnum, #hash, and #eql? On Wed, Apr 13, 2011 at 1:35 AM, Clifford Heath wrote: > On 04/13/11 15:51, Charles Oliver Nutter wrote: >> Perhaps I'm missing something. Should I be seeing different results than >> this? >> >> https://gist.github.com/917031 > > That result is reasonable, using MRI. Interesting, and nice, that it > figures out it doesn't need to call Fixnum#hash to be able to choose > a bucket. (BTW, that *uncommon* case means there's a test and branch > which is superfluous and excessively costly for the more common case, > according to arguments you've made against detecting monkey patching) > > If you do the same thing with JRuby however, the first test contains this: This is JRuby 1.6.1. - Charlie