From: William James Date: 2005-12-12T01:12:37+09:00 Subject: Re: ordered/sorted hash Hal Fulton wrote: > The problem is literals or constants. Nothing I do will ensure that > the hash { x=>a, y=>b, z=>c } will be iterated over in that > original specified order. >> [ ['x','a'], ['y','b'], ['z','c'] ].each{|x| p x} ["x", "a"] ["y", "b"] ["z", "c"] >> [ ['x','a'], ['y','b'], ['z','c'] ].assoc('z') => ["z", "c"]