From: Wilson Bilkovich Date: 2006-12-22T01:51:04+09:00 Subject: Re: Method named ***(other) On 12/21/06, Julien Gaugaz wrote: > > > > Julien Gaugaz wrote: > >> Hi! > >> > >> It's several hours now that i'm trying to find out what's special with > >> *** for a method name, without success :( > > > > That should be your clue. There _isn't_ anything special about "***", > > whereas the infix operators that exist in Ruby that you can redefine > > require special treatment by the interpreter. You can't expand the set > > of operators, and '***' isn't among them. > Ah, ok, thanks a lot. I understood why i could use '***' as an infix > operator. But still, there shouldn't be any difference between a call > like m.*** n and m.triple_star n... But it seems there is since > m.triple_star works and m.*** don't. > > I don't get it. > The basic problem is that ** is right-associative, and * is left-associative. The existing grammar can't resolve the apparent conflict. Also, *** is unreadably nasty, so it's good that you can't name a method that. :)