From: Harry Kakueki Date: 2012-10-20T12:27:51+09:00 Subject: Re: Hash with Integer key issue > # And here is the problem! Now that I am looking at it here, it's > obvious that the sort is flattening the Hash... Is there a way to > restore it to a Hash, or a better way to achieve the sort? > > irb(main):033:0> x[46] > => [3, 1] > Does this help? arr = [[49, 47], [48, 46], [47, 45], [46, 44], [45, 43], [44, 42]] p Hash[*arr.flatten] #> {49=>47, 48=>46, 47=>45, 46=>44, 45=>43, 44=>42} Harry