Multidimensional Arrays
suggest changeVersions
The notes below were written for Ruby 1.6.8–2.4. Arrays of arrays work the same way now.
Introduction
Multidimensional Arrays in Ruby are just arrays whose elements are other arrays.
The only catch is that since Ruby arrays can contain elements of mixed types, you must be confident that the array that you are manipulating is effectively composed of other arrays and not, for example, arrays and strings.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents