From: vaine@... (Ville Aine) Date: 2004-01-14T00:01:41+09:00 Subject: Re: efficient way to get the first found (or a random) key/value of a large hash David Garamond wrote in message news:<40025921.4090603@zara.6.isreserved.com>... > # is there a #pairs method which returns [[k1,v1], [k2,v2], ...} or > # something similar? Hash#to_a does just that: irb(main):003:0> {:a => 1, :b => 2}.to_a => [[:a, 1], [:b, 2]]