On 18 April 2010 02:06, caleb clausen <redmine / ruby-lang.org> wrote:

> Issue #3163 has been updated by caleb clausen.
>
>
> I _think_ this behavior is correct. At any rate, the behavior is the same
> all the way back to 1.8.6. However, this is a confusing part of parsing
> ruby, so I may be remembering wrong.
>
> Yes, this behavior is not new. And it's confusing, in fact.


> If I remember right, it goes something like this: ambiguous characters
> (such as '%' and ':' ) which could be operators or the start of literals are
> always treated as operators if preceded by a variable, no matter what
> whitespace precedes or follows them. Constants do behave the way you are
> expecting.
>

I can understand easily operators can be confusing for the parser, but I
didn't know ':' is an operator.

And the easiest way to resolve the ambiguity variable/methods wouldn't be to
look for '=' or '.' following a variable ?

I might be highly wrong, my apologies for the noise if I am,

Regards,
B.D.