From: Jeffrey 'jf' Lim Date: 2007-04-09T20:59:16+09:00 Subject: Re: On 4/9/07, John Joyce wrote: > well, actually, I knew this part about hashes being unordered. > Which, is why I asked. > I was just wondering if there was some kind of implicit sort > occurring. by right, u shouldnt really care, since it is, after all, a hash (but of course we all all curious animals... ;)) I would probably say the same thing as Robert - there is no "standard" here, and it is all up to the interpreter to do as it wishes. If u really wish to sort, u could use use '.sort', or '.sort_by' {5=>:a, 7=>:a, 2=>:a}.sort {:z=>42, :d=>43, :c=>44}.sort_by {|a| a[0].to_s} although of course, this also has the effect of transforming the hash into an array.... -jf -- "It's so hard to write a graphics driver that open-sourcing it would not help." -- Andrew Fear, Software Product Manager, NVIDIA Corporation http://kerneltrap.org/node/7228