From: "D. Krmpotic" Date: 2007-03-23T22:40:39+09:00 Subject: getting a n-th key-value pair from a hash Hi! suppose I have this hash: data = { "a" => 1, "b" => 2, "c" => 3 } I'd like to get a random pair from the hash. so data.get_pair(data.rand) should return ["b", 2] for example. How could this be done? I cannot find any method in the documentation. Thank You! david -- Posted via http://www.ruby-forum.com/.