diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ccb1928..cc73d744f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ## master (unreleased) +## 1.21.1 (2024-06-16) + ### Bug fixes * [#452](https://github.com/rubocop/rubocop-performance/pull/452): Fix an error for `Performance/RedundantEqualityComparisonBlock` when the block is empty. ([@earlopain][]) diff --git a/docs/antora.yml b/docs/antora.yml index 21b1815a3..b1478fcc7 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.21' nav: - modules/ROOT/nav.adoc diff --git a/docs/modules/ROOT/pages/cops_performance.adoc b/docs/modules/ROOT/pages/cops_performance.adoc index f7bf3fad6..b768b06cf 100644 --- a/docs/modules/ROOT/pages/cops_performance.adoc +++ b/docs/modules/ROOT/pages/cops_performance.adoc @@ -1169,8 +1169,9 @@ This cop identifies places where `map { ... }.compact` can be replaced by `filte === Safety -This cop's autocorrection is unsafe because `map { ... }.compact` that is not -compatible with `filter_map`. +This cop's autocorrection is unsafe because `map { ... }.compact` might yield +different results than `filter_map`. As illustrated in the example, `filter_map` +also filters out falsy values, while `compact` only gets rid of `nil`. === Examples diff --git a/lib/rubocop/performance/version.rb b/lib/rubocop/performance/version.rb index 5fcb5a75d..6688e4f13 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.21.0' + STRING = '1.21.1' def self.document_version STRING.match('\d+\.\d+').to_s diff --git a/relnotes/v1.21.1.md b/relnotes/v1.21.1.md new file mode 100644 index 000000000..b91129f81 --- /dev/null +++ b/relnotes/v1.21.1.md @@ -0,0 +1,5 @@ +### Bug fixes + +* [#452](https://github.com/rubocop/rubocop-performance/pull/452): Fix an error for `Performance/RedundantEqualityComparisonBlock` when the block is empty. ([@earlopain][]) + +[@earlopain]: https://github.com/earlopain