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
…eezeString`
Fixesrubocop#252.
This PR fixes an incorrect auto-correct for `Performance/UnfreezeString`
when invoking a method after `String.new` with a string.
+'str'.do_something is equivalent to +('str'.do_something), not (+'str').do_something. So, other than force_encoding method may be unintended. I opened #253 that consistent adding parentheses if a method call after an offense code.
The autocorrect for:
gave me:
Instead it should add parenthesis
Please check if there are other affected methods... I haven't tested but imagine you are already handling bang (!) methods properly.
The text was updated successfully, but these errors were encountered: