From: Tim Wolak Date: 2008-05-14T00:24:21+09:00 Subject: Re: hash merge Thanks for the post guys. My problem is this: a = { 54540 => 10345, 55550 => 30555 } b = { 54540 => 11000, 55550 => 40556 } I need to merge these into one hash where the keys are the same so that is fine, I need to subtract the values and the difference will be the new key. So I'm not sure this line is doing that I think it should do, I'm pretty sure I may have the wrong syntax. @sktyfuta.merge(@sktyfutb) { |key, old_value, new_value| old_value - new_value } Tim -- Posted via http://www.ruby-forum.com/.