David L Altenburg wrote:
> class Foo
> 
>    def [](index)
>      # logic here
>    end
> 
>    def []=(index, value)
>      # do some stuff
>    end
> 
> end

Doh, ok.  That makes sense.  [] cant be part of a method name unless it 
IS the whole method.

Thanks guys.
-- 
Posted via http://www.ruby-forum.com/.