From 2b5c8c679bf8a6150346ec6bb0c0365a37148d0b Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 4 Jan 2025 15:23:27 +0900 Subject: [PATCH] Cut 1.23.1 --- CHANGELOG.md | 2 ++ docs/antora.yml | 2 +- docs/modules/ROOT/pages/cops_performance.adoc | 26 +++++++++---------- lib/rubocop/performance/version.rb | 2 +- relnotes/v1.23.1.md | 6 +++++ 5 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 relnotes/v1.23.1.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b42ea7b892..886b3e795c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ## master (unreleased) +## 1.23.1 (2025-01-04) + ### Bug fixes * [#478](https://github.com/rubocop/rubocop-performance/pull/478): Fix `Performance/RedundantStringChars` cop error in case of implicit receiver. ([@viralpraxis][]) diff --git a/docs/antora.yml b/docs/antora.yml index 21b1815a34..0ee5485e3f 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.23' nav: - modules/ROOT/nav.adoc diff --git a/docs/modules/ROOT/pages/cops_performance.adoc b/docs/modules/ROOT/pages/cops_performance.adoc index 0794dcad2e..5c78a3f0e1 100644 --- a/docs/modules/ROOT/pages/cops_performance.adoc +++ b/docs/modules/ROOT/pages/cops_performance.adoc @@ -47,7 +47,7 @@ A <= B [#performancearraysemiinfiniterangeslice] == Performance/ArraySemiInfiniteRangeSlice -NOTE: Required Ruby version: 2.7 +NOTE: Requires Ruby version 2.7 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -92,7 +92,7 @@ array.take(3) [#performancebigdecimalwithnumericargument] == Performance/BigDecimalWithNumericArgument -NOTE: Required Ruby version: 3.1 +NOTE: Requires Ruby version 3.1 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -135,7 +135,7 @@ BigDecimal(1, 2) [#performancebindcall] == Performance/BindCall -NOTE: Required Ruby version: 2.7 +NOTE: Requires Ruby version 2.7 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -613,14 +613,14 @@ For example: [source,ruby] ---- -`Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size` +Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size ---- becomes: [source,ruby] ---- -`Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true }` +Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true } ---- [#examples-performancecount] @@ -649,7 +649,7 @@ Model.select(:value).count [#performancedeleteprefix] == Performance/DeletePrefix -NOTE: Required Ruby version: 2.5 +NOTE: Requires Ruby version 2.5 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -732,7 +732,7 @@ str.sub!(/^prefix/, '') [#performancedeletesuffix] == Performance/DeleteSuffix -NOTE: Required Ruby version: 2.5 +NOTE: Requires Ruby version 2.5 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -1236,7 +1236,7 @@ file.each_line { |l| puts l } [#performancemapcompact] == Performance/MapCompact -NOTE: Required Ruby version: 2.7 +NOTE: Requires Ruby version 2.7 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -1515,7 +1515,7 @@ end [#performanceredundantequalitycomparisonblock] == Performance/RedundantEqualityComparisonBlock -NOTE: Required Ruby version: 2.5 +NOTE: Requires Ruby version 2.5 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -1813,7 +1813,7 @@ str.chars.drop(2) # Incompatible with `str[2..-1].chars`. [#performanceregexpmatch] == Performance/RegexpMatch -NOTE: Required Ruby version: 2.4 +NOTE: Requires Ruby version 2.4 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -1978,7 +1978,7 @@ array.last [#performanceselectmap] == Performance/SelectMap -NOTE: Required Ruby version: 2.7 +NOTE: Requires Ruby version 2.7 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -2374,7 +2374,7 @@ Identifies places where `gsub` can be replaced by `tr` or `delete`. [#performancesum] == Performance/Sum -NOTE: Required Ruby version: 2.4 +NOTE: Requires Ruby version 2.4 |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed @@ -2531,7 +2531,7 @@ end [#performanceunfreezestring] == Performance/UnfreezeString -NOTE: Required Ruby version: 2.3 +NOTE: Requires 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 b9ab7da60a..103e69b485 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.23.0' + STRING = '1.23.1' def self.document_version STRING.match('\d+\.\d+').to_s diff --git a/relnotes/v1.23.1.md b/relnotes/v1.23.1.md new file mode 100644 index 0000000000..b796739dc1 --- /dev/null +++ b/relnotes/v1.23.1.md @@ -0,0 +1,6 @@ +### Bug fixes + +* [#478](https://github.com/rubocop/rubocop-performance/pull/478): Fix `Performance/RedundantStringChars` cop error in case of implicit receiver. ([@viralpraxis][]) +* [#480](https://github.com/rubocop/rubocop-performance/pull/480): Fix `Performance/Squeeze` cop error on frozen AST string node value. ([@viralpraxis][]) + +[@viralpraxis]: https://github.com/viralpraxis