Issue #9251 has been updated by rits (First Last).


> Operators have not only precedence, but also associativity. Assignment operator has right associativity.

Associativity is not involved here: a && b = c && d

The associativity of an operator specifies the order of evaluation when the same operator (or operators with the same precedence) appear sequentially in an expression

= and && are different operators with different precedence 

As I said, in the above expression, = shows both higher (on the left) and lower (on the right) precedence than && at the same time.

You did not address my last post, it's pretty clear there that this lvalue exception leads to nothing but trouble.
----------------------------------------
Bug #9251: ! operator has lower precedence than = in an assignment expression
https://bugs.ruby-lang.org/issues/9251#change-43712

Author: rits (First Last)
Status: Feedback
Priority: Low
Assignee: 
Category: doc
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/