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
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

1 comment on commit 00d940a

@koic
Copy link
Member Author

@koic koic commented on 00d940a Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build errors in Ruby 3.1.0-dev have been reported to https://bugs.ruby-lang.org/issues/18268.

Please sign in to comment.