Skip to content

Commit

Permalink
Cut 1.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jan 4, 2025
1 parent cfc046b commit 2b5c8c6
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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][])
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 13 additions & 13 deletions docs/modules/ROOT/pages/cops_performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/performance/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions relnotes/v1.23.1.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2b5c8c6

Please sign in to comment.