From: MikkelFJ Date: 2002-10-03T05:23:45+09:00 Subject: Re: Printing the Contents of a 2d Array "Rotfeast" wrote in message > [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? I must admit it looks strange, the following is also surprising: irb(main):032:0> def test2 irb(main):033:1> [0..2].each do print "x"; [1..2].each do print "y" end; print "\n"; end irb(main):034:1> end nil irb(main):035:0> test2 xy [0..2] I'm using Ruby 1.7.2 on Windows Mikkel