diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index c1345046..d3780e5e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -169,12 +169,6 @@ Naming/MemoizedInstanceVariableName: Naming/UncommunicativeMethodParamName: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -Performance/RedundantMatch: - Exclude: - - 'lib/pry/command.rb' - # Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: MaxKeyValuePairs. diff --git a/lib/pry/command.rb b/lib/pry/command.rb index a3832bb4..a53ce6f1 100644 --- a/lib/pry/command.rb +++ b/lib/pry/command.rb @@ -305,7 +305,7 @@ class Pry # the current scope. def check_for_command_collision(command_match, arg_string) collision_type = target.eval("defined?(#{command_match})") - collision_type ||= 'local-variable' if arg_string.match(%r{\A\s*[-+*/%&|^]*=}) + collision_type ||= 'local-variable' if arg_string =~ %r{\A\s*[-+*/%&|^]*=} if collision_type output.puts(