From: Love U Ruby Date: 2013-07-20T03:56:19+09:00 Subject: Hash#update - need tweaks I am in a situation,where I have to the below kind of operations. h1 = {:url_id => 1, :used => 10} h2 = {:url_id => 1, :used => 5} h1.update(h2) {|k,old,new| old + new } # => {:url_id=>2, :used=>15} now the above code is working as it supposed to do. Now I actually want the hash output `{:url_id=>1, :used=>15}`. But using `Hash#update` can this be achieved? any tweak to my code? -- Posted via http://www.ruby-forum.com/.