Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AllowRegexpMatch of Performance/RedundantEqualityComparisonBlock by default #352

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#352](https://github.com/rubocop/rubocop-performance/pull/352): Fix the default config for `AllowRegexpMatch` option of `Performance/RedundantEqualityComparisonBlock`. ([@koic][])
2 changes: 1 addition & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Performance/RedundantEqualityComparisonBlock:
Reference: 'https://github.com/rails/rails/pull/41363'
Enabled: pending
Safe: false
AllowRegexpMatch: false
AllowRegexpMatch: true
VersionAdded: '1.10'

Performance/RedundantMatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Performance
# behavior is appropriately overridden in subclass. For example,
# `Range#===` returns `true` when argument is within the range.
#
# This cop has `AllowRegexpMatch` option and it is false by default because
# This cop has `AllowRegexpMatch` option and it is true by default because
# `regexp.match?('string')` often used in block changes to the opposite result:
#
# [source,ruby]
Expand Down