matt neuburg [2008-05-07 22:15]:
> What I'm saying is: Doesn't the user reasonably expect that = and
> += will have similar precedence?
well, maybe yes. the pickaxe even lists them all as having the same
precedence [1]. but as you can easily verify, all operator
assignments in fact have a higher precedence than plain assignment.

maybe it's because "lhs '=' arg kRESCUE_MOD arg" is a special case
in parse.y [2] over the more generic "stmt kRESCUE_MOD stmt"? i
don't know. i'm far from claiming that i have grokked ruby's parsing ;-)

however, whether this is to be considered a bug, i'm not in the
position to judge...

[1]
<http://phrogz.net/ProgrammingRuby/language.html#operatorexpressions>
[2] <http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8/parse.y>

cheers
jens