From decd4a4a80fca424a693afd7eea6cca0823dfb46 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 16 Jun 2024 15:49:20 +0900 Subject: [PATCH] Cut 1.21.1 --- CHANGELOG.md | 2 ++ docs/antora.yml | 2 +- docs/modules/ROOT/pages/cops_performance.adoc | 5 +++-- lib/rubocop/performance/version.rb | 2 +- relnotes/v1.21.1.md | 5 +++++ 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 relnotes/v1.21.1.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ccb19284..cc73d744f6 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 21b1815a34..b1478fcc7a 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 f7bf3fad6b..b768b06cfe 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 5fcb5a75d1..6688e4f130 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 0000000000..b91129f811 --- /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