- Original Message -----
From: "Ted" <ted / datacomm.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Friday, November 08, 2002 2:42 PM
Subject: Multi-dimensional (like 2) arrays in Ruby


> Does Ruby support other than 1 dimensional arrays?

A Ruby array may contain any objects, other arrays among them. Those arrays
may contain still other arrays, and so on.

ary = [ [1, 2], [3, 4] ]
ary[0][0] -> 1
ary[0][1] -> 2
ary[1][0] -> 3
ary[1][1] -> 4