From: Adam Akhtar Date: 2008-09-14T20:08:09+09:00 Subject: getting an array of unique objects of a class i wrote Hi Ive done some searching on this but couldnt find an answer that was either totally appropriate or one that i could understand ;> (some advanced stuff going on). So if i have a class with two variables (strings) like this class thing attr_accessor :name :job end and i want to ensure that if i have an array of these objects there will be no duplicates. A duplicate would be where both the name and job are the same in both objects. I tried using uniq! but it didnt work. Not sure why (can someone explain that). Ive heard of set, could that be used in this case to prevent duplicates being added? -- Posted via http://www.ruby-forum.com/.