From: Peter Szinek Date: 2006-10-17T18:52:01+09:00 Subject: Re: Array.new question Alex, > Right... In that case, how about this: > > input.each{|i| i.each_with_index{|x,j| (result[j] ||= []) << x}} > > Not sure if it'll play the way you want with variable-length arrays, but > it puts the right contents in result. Thx for the solution! Mine was totally the same (for the first time in history since I am using Ruby :-) as someone proposed on this list ;-) Peter http://www.rubyrailways.com