You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a=false
b=false
c=false
# original code
unless a && b
puts "HI1" unless c
end
# should have been converted to either
puts "HI3" if !(a && b) && !c
puts "HI4" if !a && !b && !c
…dConditional`
Fixesrubocop#10646.
This PR fixes an incorrect autocorrect for `Style/SoleNestedConditional`
when using `unless` and `&&` without parens in the outer condition
and nested modifier condition.
Rubocop proposed to fix this warning
But broke the code.
Expected behavior
Actual behavior
was converted to
which broke the code
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: