2000-05-05から1日間の記事一覧
備忘録目次 - ロバの耳 h = { 'Apple' => 'red', 'Banana' => 'yellow', 'Lemon' => 'yellow', 'Carrot' => 'orange' } h.each_key {|key| p "#{key} is #{h[key]}."} h.each_pair {|key, val| p "#{key} is #{val}."} # 出力結果はいずれも #=> "Lemon is y…
備忘録目次 - ロバの耳 h = { 'Apple' => 'red', 'Banana' => 'yellow', 'Lemon' => 'yellow', 'Carrot' => 'orange' } h.each_key {|key| p "#{key} is #{h[key]}."} h.each_pair {|key, val| p "#{key} is #{val}."} # 出力結果はいずれも #=> "Lemon is y…