i have following code.
for i in 0..sold.length-1 duplicate = sold[i] print duplicate.check_duplicates print \" \" print sold[i].lotnumber + \
uniq_solds = sold.collect{|s| [s.check_duplicates, s.lotnumber, s.serialnumber]}.uniq uniq_solds.each do |s| p s.join(" ") end