From: Brian Candler Date: 2012-10-21T21:33:23+09:00 Subject: Re: Hash with Integer key issue unknown wrote in post #1080538: > Have you read the previous posts in this thread? > The code above was given in reply to the OP's question, and it works > as expected in Ruby 1.9.3 because hashes are indeed sorted there. FWIW, they are not sorted, but they do retain the original insertion order. If you want a collection which is always sorted, then you need something like a heap. -- Posted via http://www.ruby-forum.com/.