From: Florian Gross Date: 2007-07-12T06:01:54+09:00 Subject: Re: Accessing a specific index in a nested array > For example, this works: > irb> array[2] > => [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] > > But this doesn't seem to: > irb> array[2[2]] > => [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] > > I'm pretty sure I'm just getting the syntax wrong. Yup, you're calling [] on the number 2. You want array[2][2].