From: Greg Hauptmann Date: 2009-09-05T18:52:31+09:00 Subject: how to compare two object instances? is "m1.to_yaml.eql?(m2.to_yaml)" a good way? Hi, What's an easy way to compare for equality two object instances (that haven't been saved yet). Or in other words pretty much just two object instances. I've tried "==" and "eql?" on the objects directly and this doesn't work. How about: "m1.to_yaml.eql?(m2.to_yaml)" Is this the simplest way? (i.e. leveraging the ability to serialize the object to a yaml string) tks