Actions
Bug #14562
closedDo not warn for assignment in conditionals inside ()
Bug #14562:
Do not warn for assignment in conditionals inside ()
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-03-01 trunk 62617) [x86_64-darwin16]
Description
Ruby warns against this code, which is very helpful.
So there's a commonly known practice. In order to express that we're intentionally assigning (not missing one more = sign), we usually add parens around the assignment.
But in fact, Ruby still warns...
Can this behavior changed not to warn when parenthesized?
Actions