Simen Edvardsen wrote:
> That's because operator overriding isn't an extension of the
> semantics, but the syntax. Perhaps the documentation ought to make
> that clear.

I agree with that. The documentation should note that << only overloads 
or defines the method called "<<", but does not overloads or redefines 
the syntax of <<. Ofcourse the same goes for other operators like + and 
-. On the other hand, ruby only gives a syntax error when calling the 
method and doesn't warn the programmer when defining the method. I think 
it's logical that ruby warns when programmer when the method is defined, 
since the example I give on top is completely unuseful.

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