From: x1 Date: 2006-12-01T11:59:16+09:00 Subject: time = ["min", "sec"].collect {|i| {i=> Time.now.send(i).to_i}} What's the best way to make the first item below yield a hash instead of an array in one line? I'm struggling :( #doesnt work time = ["min", "sec"].collect {|i| {i=> Time.now.send(i).to_i}} puts time.type # Array #works time = ["min", "sec"].collect {|i| {i=> Time.now.send(i).to_i}}.first puts time.type # Hash puts time['min'] Thanks in advance