:
: > messju mohr wrote:
:
: >>
: >>i also get one if i run
: >>puts 1 if ( a == b
: >> or a == c )
: >>
: >>maybe just because "or" is an operator and "a" isn't. i avoid newlines
: >>inside ruby-statements because i don't know the rules i have to
: >>obey. where are they stated?
: >>
: >>
:
: > I don't know where they are authoritatively stated, except in the Ruby
: > source code.
"or" is, indeed, an operator. So are '==', '+', 'and',
: > '&&', 'not', '!', '=~', and so forth.
:
: == and + (among others) are methods, not operators.
a + b
^
Operator
a .+ b
^
Method
Operator evaluation involves method calls, but operators are still
different things from methods. This is at the syntactic level,
not the semantic level.
--Dave