From: Luc Heinrich Date: 2010-06-23T18:58:34+09:00 Subject: Re: Iterate over specific keys in a hash On 23 juin 2010, at 11:23, Safas Khkjh wrote: > Hi, > I have a hash; > > cars{ "car0" => "bmw", "car1" => "seat", "car3" => "mercedes", "car4" => > "renault"} > > What I want is to extract just the values of car0 and car3. cars.values_at("car0", "car3") # => ["bmw", "mercedes"] -- Luc Heinrich - luc@honk-honk.com