From: Random Qu Date: 2009-04-20T15:57:20+09:00 Subject: Hash merge question Hi All, I have 2 hashes like this. h1 = { a1 => [y1, y2, y3], a2 => [y4, y5, y6] } h2 = { a2 => [z1, z2, z3], a3 => [z4, z5, z6] } And I nedd to merge them into something like this. h = { a1 => [[y1, y2, y3] , []] a2 => [[y4, y5, y6] , [z1, z2, z3]] a3 => [[] , [z4, z5, z6]] } What's the best way of doing this? Thanks a lot for your help! - RQ -- Posted via http://www.ruby-forum.com/.