From: Evan Farrar Date: 2009-03-20T02:34:28+09:00 Subject: Re: Initializing an NxN array Since * is defined on array, you can start with a 1x1 array and multiply to the size you need. n = 3; ary = [[0]*n]*n results in: ary => [[0, 0, 0], [0, 0, 0], [0, 0, 0]] -- Posted via http://www.ruby-forum.com/.