From: jjthrash@... Date: 2001-03-06T23:04:44+09:00 Subject: [ruby-talk:12131] Re: Weird Array behavior On Tue, Mar 06, 2001 at 11:00:40PM +0900, jjthrash@pobox.com wrote: > array = Array.new((oldArray.size.to_f/3).ceil, Array.new(2)) I just figured it out. The above fills all the entries of the array with that one object Array.new(2). The following fixes it: array = Array.new((oldArray.size.to_f/3).ceil) (0..array.size-1).each do |val| array[val] = Array.new(2) end Thanks for listening. ;) Jimmy -- jjthrash SPAM pobox SPAM com