From: "Thom T." Date: 2013-06-18T00:52:03+09:00 Subject: Comparing objects How do I compare two objects in Ruby, considering only attributes values? For example: class Foo attr_accessor :bar, :baz end lorem = Foo.new ipsum = Foo.new lorem.bar = 1 lorem.baz = 2 ipsum.bar = 1 ipsum.baz = 2 puts lorem == ipsum # false Both objects belongs to the same class and also have the same attributes values. Thanks. -- Posted via http://www.ruby-forum.com/.