From: Phrogz Date: 2007-01-24T02:15:09+09:00 Subject: Re: Multiplying array WKC CCC wrote: > How can the inject function work on 2 arrays? It can't; I only read the first line of your post (which described a single array) and rushed off my answer. As penance, I give you another solution: a = [ 1, 2, [3], [4], 5] b = [ 6, [7], [8], 9, 10 ] p a.flatten.zip(b.flatten).map{ |a,b| a*b } #=> [6, 14, 24, 36, 50]