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
String#chompmethod for '\n' (single quoted) should not be affected by Style/RedundantArgument cop, because special treatment in this method is "\n" (double quoted).
Actual behavior
Single quoted '\n' is also detected offence after this commit: 8b3656d
Steps to reproduce the problem
Targetting example Ruby file like contains 'foo'.chomp('\n'):
bundle ex rubocop --only Style/RedundantArgument single_quote_chomp.rb
Result:
Inspecting 1 file
C
Offenses:
single_quote_chomp.rb:1:12: C: [Correctable] Style/RedundantArgument: Argument '\n' is redundant because it is implied by default.
'foo'.chomp('\n')
^^^^^^
Expected behavior
String#chomp
method for'\n'
(single quoted) should not be affected byStyle/RedundantArgument
cop, because special treatment in this method is"\n"
(double quoted).Actual behavior
Single quoted
'\n'
is also detected offence after this commit: 8b3656dSteps to reproduce the problem
Targetting example Ruby file like contains
'foo'.chomp('\n')
:Result:
RuboCop version
The text was updated successfully, but these errors were encountered: