On 6/24/07, Gregory Brown <gregory.t.brown / gmail.com> wrote:
> On 6/24/07, Anthony Martinez <pi / pihost.us> wrote:
>
> > Usage is:
> >
> > Array.multi(5,5,0)
> > # => [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
> > Array.multi(5,5) {""}
> > # => [["", "", "", "", ""], ["", "", "", "", ""], ["", "", "", "", ""], ["", "", "", "", ""], ["", "", "", "", ""]]
>
> I'm far too lazy.
>
> I'd just do
>
> a = [[0]*5]]*5

Arg. don't do that. it makes the same array for each. :-/