From: "nobu (Nobuyoshi Nakada)" Date: 2013-12-16T12:45:01+09:00 Subject: [ruby-core:59128] [ruby-trunk - Bug #9251][Feedback] ! operator has lower precedence than = in an assignment expression Issue #9251 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Feedback Priority changed from Normal to Low Then do you want it be a syntax error? Assignment to a negated expression makes no sense. Or can you elaborate its semantics? ---------------------------------------- Bug #9251: ! operator has lower precedence than = in an assignment expression https://bugs.ruby-lang.org/issues/9251#change-43690 Author: rits (First Last) Status: Feedback Priority: Low Assignee: Category: Target version: ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784) [i686-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN irb(main):001:0> !a = 1 (irb):1: warning: found = in conditional, should be == => false irb(main):002:0> a => 1 ! is supposed to have higher precedence than =, so !a = 1 should be (!a) = 1, and thus an error, not !(a = 1) -- http://bugs.ruby-lang.org/