From: Hal Fulton Date: 2006-07-26T09:56:05+09:00 Subject: Re: Hash order bug? Paul Battley wrote: > On 25/07/06, dblack@wobblini.net wrote: > >> The question came up during a lunch here at OSCON (with me, Jim >> Weirich, Pat Eyler, and a fellow named Nicolas whose last name I'm >> afraid I don't remember) as to whether making hashes ordered in a >> future Ruby would break any existing code. I think the answer is no, >> which is kind of interesting considering what a major change it would >> be. It's a case where the feature would be purely additive. > > > I think that would depend on whether {:a => 1, :b => 2} == {:b => 2, > :a => 1}. If that's the same, everything should be fine. If it's > different, I know that it would break a number of my tests, if nothing > else. In previous discussions, Matz said these would still be equal. That suits me: I could still do h1.to_a == h2.to_a if needed. Hal