Alex wrote:
> The index method of the array class is a method just like any other, so 
> you
> could just as well write it like:
> 
> foo.[](0).[](0)
> 
> which calls the `[]' method on the result of the previous call of the 
> `[]'
> method, which is an array.
> 
> foo[0] is just a shortcut ruby gives you for calling foo.[](0)

Or in this particular case, you can do

  foo.first.first
-- 
Posted via http://www.ruby-forum.com/.