On Jun 8, 2011, at 16:12 , Iñáki Baz Castillo wrote: > 2011/6/9 Anurag Priyam <anurag08priyam / gmail.com>: >>> I cannot find which class or module #hash method belongs to. I >>> expected it could be in Object class, but it's not. Where is it? >> >> method(:hash).owner # => Kernel > > Thanks, I didn't know the #owner method :) > > >> I think the above tip was discussed on the list sometime back. > > It's strange that the #hash method is not defined within the Kernel doc: > > http://www.ruby-doc.org/core/classes/Kernel.html % ri hash ... (from ruby core) === Implementation from Object ------------------------------------------------------------------------------ obj.hash => fixnum ------------------------------------------------------------------------------ Generates a Fixnum hash value for this object. This function must have the property that a.eql?(b) implies a.hash == b.hash. The hash value is used by class Hash. Any hash value that exceeds the capacity of a Fixnum will be truncated before being used. ...