At the risk of sounding like a nuby to ruby...

I know in Python, I can print the contents of the array
[[1,2,3],[4,5,6],[7,8,9]] on the screen by using nested loops and "\n"
statements.  I can make it appear as 3 rows of 3 elements, like a
matrix.  I tried doing this in Ruby using analogous syntax:

[0..2].each do |i|
    [0..2].each do |j|
        print $a[i][j]
    end
print "\n"
end

My output is 123456789--not what I'm looking for.  Any thoughts?