From: Erik Veenstra Date: 2006-02-11T20:23:24+09:00 Subject: Re: OpenStruct problem That's because the hash (I mean the result of #hash) of both OpenStruct objects differ. $ ri Object#hash .... gives you: "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." gegroet, Erik V. - http://www.erikveen.dds.nl/ ---------------------------------------------------------------- require "ostruct" o1 = OpenStruct.new o1.foo = "a" o1.bar = "b" o2 = OpenStruct.new o2.foo = "a" o2.bar = "b" p o1.hash p o2.hash ----------------------------------------------------------------