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.
Fixes rubocop#7569. This PR makes `Style/YodaCondition` cop accept `__FILE__ == $0` I think that both operands `__FILE__ == $0` can be assumed to be read-only, as mentioned in rubocop#7569. If users try to assign `__FILE__`, an error will occur. Also, it is not usually assigned to `$0` by users. Therefore, this PR will make `Style/YodaCondition` cop accept both `__FILE__` and `$0` on the left side. Also, this PR will change only an idiom `__FILE__ == $0`.
- Loading branch information
Showing
3 changed files
with
21 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