Skip to content

Commit

Permalink
Merge pull request #352 from koic/fix_default_config_of_redundant_equ…
Browse files Browse the repository at this point in the history
…ality_comparison_block

Fix `AllowRegexpMatch` of `Performance/RedundantEqualityComparisonBlock` by default
  • Loading branch information
koic authored Apr 9, 2023
2 parents c6abfdd + 91b35ba commit d9d53b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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

0 comments on commit d9d53b1

Please sign in to comment.