The implementation of respond_to? here is independent of the
implementation on Object which uses the include_private argument.
In this implementation the _include_private argument can and will never be used.
So remove it from the code.
NullObject inherits from BasicObject.
BasicObject does not implement respond_to? or respond_to_missing?
Since we're inheriting from BasicObject we don't implement respond_to
and respond_to_missing? in the same way as we would if we were
inheriting from Object
Since respond_to_missing? will never be called, we can delete the unused
code.
In order to stop Rubocop complaining about this we need to disable the
Style/MissingRespondToMissing cop.
References:
https://ruby-doc.org/core-2.7.1/BasicObject.html
* Alphabetize gem listing in various Gemfiles [Rubocop Bundler/OrderedGems]
* Fix alignment of if/else/end statement [Rubocop Layout/ElseAlignment]
* Method definitions should have a empty line between them [Rubocop Layout/EmptyLineBetweenDefs]
* Modules, Classes, and blocks should have an empty line around them [Rubocop]
Cops:
Layout/EmptyLinesAroundBlockBody
Layout/EmptyLinesAroundModuleBody
Layout/EmptyLinesAroundClassBody
Layout/EmptyLinesAroundAccessModifier
* Keep a blank line before and after access modifiers [Rubocop Layout/EmptyLinesAroundAccessModifier]
* Remove misc extra whitespace [Rubocop Layout/ExtraSpacing]
* Indent the first line of the right-hand-side of a multi-line assignment [Rubocop Layout/IndentAssignment]
* Remove extraneous whitespace [Rubocop]
Cops:
Layout/IndentationWidth
Layout/LeadingCommentSpace
Layout/SpaceAroundEqualsInParameterDefault
Layout/SpaceInsideArrayLiteralBrackets
Layout/SpaceInsideBlockBraces
Layout/SpaceInsideParens
Layout/TrailingBlankLines
* Revert rubocop changes to gemfiles; exclude files from rubocop checks
The files in gemfiles/ are generated by Appraisal, so we shouldn't edit them. Instead, let's tell RuboCop to exclude this directory.