Report abuse


			
class Foo
  def hash
    1
  end

  def eql?(arg)
    true
  end
end

a = Foo.new
b = Foo.new

h = {}
h[a] = 100
puts h.length # => 1
h[b] = 100
puts h.length # => 1