From: Chris Gehlker Date: 2006-08-16T19:50:06+09:00 Subject: Re: Nooby question : multidimensional arrays. On Aug 16, 2006, at 2:37 AM, marinho.tobolla@syncity.de wrote: > Well am I right, that in Ruby there are only one dimensional > arrays, and that i have to add an array into an array to get > multidimensional arrays, or is there a simpler more ruby like way > to create them ? Yep. You create them by just making arrays of arrays and you reference them just like C arrays irb(main):001:0> ary = [] => [] irb(main):002:0> ary << [1, 2, 3] << %w{dog cat bird} << [8, 10, 17] => [[1, 2, 3], ["dog", "cat", "bird"], [8, 10, 17]] irb(main):003:0> ary[1][2] => "bird" -- The folly of mistaking a paradox for a discovery, a metaphor for a proof, a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Paul Valery, poet and philosopher (1871-1945)