Skip to content

Commit

Permalink
Suppress warning: method redefined; discarding old warn_on_pending_cops
Browse files Browse the repository at this point in the history
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. rails/rails#23534
  • Loading branch information
koic committed Oct 26, 2021
1 parent e1de418 commit 00d940a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec/support/suppress_pending_warning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
module RuboCop
class ConfigLoader
class << self
remove_method :warn_on_pending_cops
def warn_on_pending_cops(config)
# noop
end
Expand Down

0 comments on commit 00d940a

Please sign in to comment.