a = {a: 1, b: 2, c: 3}b = {a: 2, c: 4, b: 3}merged = a.merge!(b) { |k, o, n| o + n }p merged
Standard input is empty
{:a=>3, :b=>5, :c=>7}
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!