From: brabuhr@... Date: 2009-07-18T09:38:34+09:00 Subject: Re: [Q] removing array duplicates where a subset is unique On Fri, Jul 17, 2009 at 7:51 PM, Chuck Remes wrote: > (And Joel, I have presorted the array prior to removing the > dupes so I have already taken care of the ordering issue.) I think what Joel was referring to was that in Ruby 1.8 a Hash doesn't maintain insertion order when traversed (Ruby 1.9 does maintain insertion order): ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]: irb(main):001:0> h = {} => {} irb(main):002:0> 5.times{|n| h[n] = n} => 5 irb(main):003:0> h => {0=>0, 1=>1, 2=>2, 3=>3, 4=>4} irb(main):004:0> h["sadf"] = 3 => 3 irb(main):005:0> h => {0=>0, 1=>1, "sadf"=>3, 2=>2, 3=>3, 4=>4}