Class: Hash
Overview
extracted from from http://blog.playlouder.com/2008/05/07/an-interesting-ruby-hash-semantics-gotcha/
Instance Method Summary collapse
Instance Method Details
#eql?(other) ⇒ Boolean
8 9 10 |
# File 'lib/sane_ruby/hash_hashes.rb', line 8 def eql?(other) self == other end |
#hash ⇒ Object
4 5 6 |
# File 'lib/sane_ruby/hash_hashes.rb', line 4 def hash inject(0) {|hash,pair| hash ^ pair.hash} end |