Style/SoleNestedConditional
autocorrects unless
without parens incorrectly
#9350
Labels
Style/SoleNestedConditional
autocorrects unless
without parens incorrectly
#9350
I found a small bug when applying autocorrect.
It is exemplified using
unless
without parens, but with a nested modifier condition:Expected behavior
Autocorrect should perform several transformations, resulting in:
Actual behavior
The
!
is in the wrong place:It appears that the order of transformations is wrong.
Steps to reproduce the problem
My example above should reproduce it. I have a fix PR with specs coming shortly.
RuboCop version
The text was updated successfully, but these errors were encountered: