Forum: Ruby Re: Sorting with Hash

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kroeger, Simon (ext) (Guest)
on 2006-04-27 17:10
(Received via mailing list)
Hi Dinesh!

h = { "c" => 20, "b" => 30, "a" => 10  }
c ={|k| [k, h[k]]}

puts c
puts '======='
puts c[0]


This topic is locked and can not be replied to.