------ art_34474_16767398.1178368272219 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 5/5/07, Haoqi Haoqi <axgle / 126.com> wrote: > > > > Hashes are unordered. If you need an ordered collection, you'll need > > to use an array. > > > Hashes are unordered. that is how sadly for me,really! > > -- > Posted via http://www.ruby-forum.com/. > > Hi, I missed some of this thread, I only just joined the list. Although it's less than optimal, can you not just sort the keys when you need them. Something like: require 'enumerator' sorted_keys ash.enum_for(:each_key).to_a.sort Again, there might very well be a better way to do even that, I'm new to ruby. Nick ------ art_34474_16767398.1178368272219--