From: James Edward Gray II Date: 2006-06-20T23:17:23+09:00 Subject: uniq() Oddity Would someone please explain this behavior to me? a = [ { :foo => :bar }, { :foo => :bar } ] p a #=> [{:foo=>:bar}, {:foo=>:bar}] p a[0] == a[1] #=> true # why does this next call do nothing? p a.uniq #=> [{:foo=>:bar}, {:foo=>:bar}] # inefficient work-around p a.inject([]) { |cp, e| cp.include?(e) ? cp : cp << e } #=> [{:foo=>:bar}] James Edward Gray II