From 00d940a5ce3c4dcee5d0662970677d601225204c Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Tue, 26 Oct 2021 10:58:02 +0900 Subject: [PATCH] Suppress warning: method redefined; discarding old warn_on_pending_cops This PR suppresses the following warning. ```console % RUBYOPT=-w bundle exec rspec spec/rubocop/remote_config_spec.rb (snip) /Users/koic/src/github.com/rubocop/rubocop/spec/support/suppress_pending_warning.rb:11: warning: method redefined; discarding old warn_on_pending_cops /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/config_loader.rb:153: warning: previous definition of warn_on_pending_cops was here ``` cf. https://github.com/rails/rails/pull/23534 --- spec/support/suppress_pending_warning.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/support/suppress_pending_warning.rb b/spec/support/suppress_pending_warning.rb index fc4038d1188..13eb73df7c8 100644 --- a/spec/support/suppress_pending_warning.rb +++ b/spec/support/suppress_pending_warning.rb @@ -8,6 +8,7 @@ module RuboCop class ConfigLoader class << self + remove_method :warn_on_pending_cops def warn_on_pending_cops(config) # noop end