Closed mejackreed closed 7 years ago
c = a.merge(b){ |k, v1, v2| v1.to_i + v2.to_i } # and then irb(main):033:0> a["(0,0,0)"] => "3" irb(main):034:0> b["(0,0,0)"] => "13" irb(main):035:0> c["(0,0,0)"] => 16