forked from rubocop/rubocop
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a false positive for
Style/CaseEquality
cop
Follow rubocop#8322 (comment) Fix a false positive for `Style/CaseEquality` cop when the receiver is not a camel cased constant. The following constant should not be replaced with `is_a?`. What kind of object is actually assigned depends on the constant. e.g.: ```ruby REGEXP_CONSTANT === something #=> does not register an offense. ``` This PR will only consider camel-cased constant as class name. e.g.: ```ruby Array === something #=> auto-correct to `something.is_a?(Array)` ```
- Loading branch information
Showing
4 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters