From: "Mehr, Assaph (Assaph)" Date: 2004-03-31T14:56:22+09:00 Subject: Re: Syntax: eval( "a = !a) != eval( "a = not a") > Is there a reason why eval( "a = not a") raises a syntax error > whereas eval( "a = !a") works as I expected ? Probably because the statement "a = not a" is also a syntax error (regardless of the eval). The 'not' operator has a lower precedence than assignment, whereas the ! operator has a higher precedence. Therefore the interpreter reads the second form as "a = not" which is a syntax error. If you really want to use the word form use: eval("a = (not a)"), which will take care of precedence. See: http://phrogz.net/ProgrammingRuby/tut_expressions.html#definedandorandno t and http://phrogz.net/ProgrammingRuby/language.html the section on Boolean Expressions and table_18.4.