From: Victor Reyes Date: 2005-12-09T04:56:50+09:00 Subject: Re: Help defining multi-dimensional array ------=_Part_17086_9203740.1134071803183 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This was quick. Thank you On 12/8/05, James Edward Gray II wrote: > > On Dec 8, 2005, at 1:38 PM, Victor Reyes wrote: > > > Ruby Team, > > I would like to define a 3x3 array of integers. > > Can anyone tell me how this is done? > > Here's one way: > > >> Array.new(3) { Array.new(3) { 0 } } > =3D> [[0, 0, 0], [0, 0, 0], [0, 0, 0]] > > Hope that helps. > > James Edward Gray II > > ------=_Part_17086_9203740.1134071803183--