How can I compare two objects and get true if some of his atributes are equals ? I need to compare two arrays of users, and get and third array just with the matches. I found the "&" method that work for Fixnuns and String, but...how to use with objects ? class User attr_accessor :email end a = User.new a.email = 'ruby / rails.com' b = User.new b.email = 'ruby / rails.com' array_one = [a] array_two = [b] array_three = array_one & array_two puts array_three # I want the user here Can you help me ? thanks -- Posted via http://www.ruby-forum.com/.