From: Ted Date: 2002-11-09T08:18:31+09:00 Subject: Re: Multi-dimensional (like 2) arrays in Ruby All of the replies say the same thing -- this is good. My learning project for Ruby is implementing a turning grille cipher. I want to allocate a n*m matrix where n and m are read from stdin. I have the n[] (the rows) array, no sweat. But the m part (the columns) is rather elusive. Here's my latest code: @m = Array.new(@rows) @M = @m.each {|row| @m[row] = Array.new(@cols)} It doesn't work, either... :-(