if
condition containing semicolon-separated expressions shouldn't have parentheses removed
#10227
Labels
if
condition containing semicolon-separated expressions shouldn't have parentheses removed
#10227
The following code prints
condition is true
:Output of
rubocop foo.rb
:Expected behavior
RuboCop should not autocorrect.
Actual behavior
The above code gets autocorrected to this:
Now the wrong string is printed:
condition is false
Output of
rubocop --auto-correct foo.rb
:Steps to reproduce the problem
foo.rb
foo.rb
rubocop foo.rb
rubocop --auto-correct foo.rb
RuboCop version
1.22.3 (using Parser 3.0.2.0, rubocop-ast 1.12.0, running on ruby 2.7.4 x86_64-darwin20)
The text was updated successfully, but these errors were encountered: