From: Simen Edvardsen Date: 2006-06-26T04:40:58+09:00 Subject: Re: Odd << behaviour That's because operator overriding isn't an extension of the semantics, but the syntax. Perhaps the documentation ought to make that clear. On 6/25/06, Ryan Mulligan wrote: > Simen Edvardsen wrote: > > It's syntactic sugar. You can't expect it to work with arbitrary > > arities. It's a bit like complaining that you can't to `1 + 2, 3' in > > Ruby. << makes sense with one argument. > > My complaint lies more in the fact that most ruby documentation I have > read, doesn't tell you the whole story about operator orriding. They say > you can do it, but they neglect to tell you that your syntatic sugar > will fail if you want your operator to have a different arity. > > -- > Posted via http://www.ruby-forum.com/. > > -- - Simen