Return to Snippet

Revision: 24772
at March 10, 2010 18:50 by inkdeep


Initial Code
h1 = {'1'=>'a', '2'=>'b', '3'=>'c', '4'=>'z'}
h2 = {'4'=>'e'}
puts h1.inspect
# => {"1"=>"a", "2"=>"b", "3"=>"c", "4"=>"z"}
h1.update(h2)
puts h1.inspect
# => {"1"=>"a", "2"=>"b", "3"=>"c", "4"=>"e"}

Initial URL


Initial Description


Initial Title
stupid hash update experiments in ruby

Initial Tags
ruby

Initial Language
Ruby