This version of the method is defined successfully
def foo(bar)
baz >= baz(bar)
end
whereas this version of the method has a syntax error:
def foo(bar)
baz >= baz bar
end
# syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
Does Ruby think I mean baz(>= baz bar)
(which shouldn't work because you can't start an expression with a binary operator?) or (baz >= baz) bar
? (which doesn't make any sense)?
I would appreciate some kind of explanation or even better a pointer to Ruby doc which explains why this expression is so difficult to parse.