From: Caleb Clausen Date: 2010-04-18T11:34:10+09:00 Subject: [ruby-core:29587] Re: [Bug #3163] SyntaxError when using variable which is also a method in current scope with a Symbol argument On 4/17/10, Benoit Daloze wrote: > I can understand easily operators can be confusing for the parser, but I > didn't know ':' is an operator. It's half of the "ternary operator": a ? b : c It's also allowed as a substitute for 'then' in 1.8. > And the easiest way to resolve the ambiguity variable/methods wouldn't be to > look for '=' or '.' following a variable ? I didn't understand this... there are plenty of cases where a variable is allowed but doesn't have to be followed by '=' or '.'. In principle, one could allow ':' as an "operator" only if a '?' without matching ':' has been seen recently. In my judgment, this would be too much additional complication in an area of the parser/lexer that's already extremely squirelly.