Bug #16092
Updated by Dan0042 (Daniel DeLorme) over 4 years ago
The docs state that modifier-rescue has higher lower precedence than assignments which have higher lower precedence than modifier-if. This is true for `v = expr rescue $! if condition` but not for `v = expr if condition rescue $!` which is treated as `(v = expr if condition) rescue $!` rather than `v = expr if (condition rescue $!)` This goes similarly for `defined? expr rescue $!` `not expr rescue $!` `expr1 and expr2 rescue $!` `expr1 or expr2 rescue $!` So maybe the documentation should state that modifier-rescue has **equal** precedence to modifier-if & others, with an **exception** made for assignments? I'm not entirely sure how to describe that exception though.