From: Robert Dober Date: 2010-06-05T23:41:20+09:00 Subject: Re: comparing objects On Sat, Jun 5, 2010 at 2:35 PM, Robert Klemme wrote: > On 05.06.2010 00:35, Anderson Leite wrote: >> >>  Before >>> >>> we can provide solutions we have to know what problem must be solved. > >> I have a list of objects that came from database and another list of >> objects extracted from a xml. I need the elements who are in both lists. >> >> >> Then...I thought to compare objects overriding the == method like Marcin >> Wolski wrote. There is another solution ? > > If all objects you are dealing with implement #eql? and #hash in a way to be > suitable for that comparison then using #eql? is the most straightforward > approach. Not #eql?, #== please. Cheers R. -- The best way to predict the future is to invent it. -- Alan Kay