From: Todd Benson Date: 2008-01-15T00:25:05+09:00 Subject: Re: Callable class with block On Jan 14, 2008 9:01 AM, Lars wrote: > On Jan 13, 8:16 pm, Robert Dober wrote: > > Personally I'd love to have that changed. > > [] is an operator (the index operator). I would expect [] to have > higher precedence than anything that follows it. Although implemented > as such, it should not be seen as a function call, IMHO. > > If > > foo[i] #=> 42 > > Then I would expect > > foo[i] { } > > to be the same as > > 42 { } > > which makes little sense. So operators that you can redefine and execute as a method cannot except a block as a general rule of thumb? I would think foo[i] { } would be parsed as (foo[i] { }) as a single piece, especially if you defined it to receive a block.