diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a2ce73f7b..433a976f30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ## master (unreleased) +## 1.19.1 (2023-09-17) + ### Bug fixes * [#367](https://github.com/rubocop/rubocop-performance/issues/367): Fix an incorrect autocorrect for `Performance/BlockGivenWithExplicitBlock` when using `Lint/UnusedMethodArgument`'s autocorrection together. ([@ymap][]) diff --git a/docs/antora.yml b/docs/antora.yml index 21b1815a34..19b1b92720 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -2,6 +2,6 @@ name: rubocop-performance title: RuboCop Performance # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: '1.19' nav: - modules/ROOT/nav.adoc diff --git a/docs/modules/ROOT/pages/cops_performance.adoc b/docs/modules/ROOT/pages/cops_performance.adoc index 6da0f42d81..dd15de7edb 100644 --- a/docs/modules/ROOT/pages/cops_performance.adoc +++ b/docs/modules/ROOT/pages/cops_performance.adoc @@ -1328,6 +1328,12 @@ is wanted. This cop is unsafe because `Range#include?` (or `Range#member?`) and `Range#cover?` are not equivalent behavior. +Example of a case where `Range#cover?` may not provide the desired result: + +[source,ruby] +---- +('a'..'z').cover?('yellow') # => true +---- === Examples @@ -1339,11 +1345,6 @@ are not equivalent behavior. # good ('a'..'z').cover?('b') # => true - -# Example of a case where `Range#cover?` may not provide -# the desired result: - -('a'..'z').cover?('yellow') # => true ---- === References @@ -2299,6 +2300,8 @@ end == Performance/UnfreezeString +NOTE: Required Ruby version: 2.3 + |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed diff --git a/lib/rubocop/performance/version.rb b/lib/rubocop/performance/version.rb index c3e87793f4..52ddb9e887 100644 --- a/lib/rubocop/performance/version.rb +++ b/lib/rubocop/performance/version.rb @@ -4,7 +4,7 @@ module RuboCop module Performance # This module holds the RuboCop Performance version information. module Version - STRING = '1.19.0' + STRING = '1.19.1' def self.document_version STRING.match('\d+\.\d+').to_s diff --git a/relnotes/v1.19.1.md b/relnotes/v1.19.1.md new file mode 100644 index 0000000000..d7da5fe6c3 --- /dev/null +++ b/relnotes/v1.19.1.md @@ -0,0 +1,10 @@ +### Bug fixes + +* [#367](https://github.com/rubocop/rubocop-performance/issues/367): Fix an incorrect autocorrect for `Performance/BlockGivenWithExplicitBlock` when using `Lint/UnusedMethodArgument`'s autocorrection together. ([@ymap][]) +* [#370](https://github.com/rubocop/rubocop-performance/issues/370): Fix an incorrect autocorrect for `Performance/RedundantMatch` when expressions with lower precedence than `=~` are used as an argument. ([@ymap][]) +* [#365](https://github.com/rubocop/rubocop-performance/issues/365): Fix false positives for `Performance/ArraySemiInfiniteRangeSlice` when using `[]` with string literals. ([@koic][]) +* [#373](https://github.com/rubocop/rubocop-performance/pull/373): Set target version for `Performance/UnfreezeString`. ([@tagliala][]) + +[@ymap]: https://github.com/ymap +[@koic]: https://github.com/koic +[@tagliala]: https://github.com/tagliala