Skip to content

Commit ad65d4e

Browse files
committed
Cut 1.20.2
1 parent 2e13b10 commit ad65d4e

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
## master (unreleased)
1313

14+
## 1.20.2 (2024-01-08)
15+
1416
### Bug fixes
1517

1618
* [#425](https://github.com/rubocop/rubocop-performance/issues/425): Fix a false positive for `Performance/StringIdentifierArgument` when using string interpolation with methods that don't support symbols with `::` inside them. ([@earlopain][])

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ name: rubocop-performance
22
title: RuboCop Performance
33
# We always provide version without patch here (e.g. 1.1),
44
# as patch versions should not appear in the docs.
5-
version: ~
5+
version: '1.20'
66
nav:
77
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_performance.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,13 +2080,18 @@ and the following examples are parts of it.
20802080
send('do_something')
20812081
attr_accessor 'do_something'
20822082
instance_variable_get('@ivar')
2083-
const_get("string_#{interpolation}")
2083+
respond_to?("string_#{interpolation}")
20842084
20852085
# good
20862086
send(:do_something)
20872087
attr_accessor :do_something
20882088
instance_variable_get(:@ivar)
2089-
const_get(:"string_#{interpolation}")
2089+
respond_to?(:"string_#{interpolation}")
2090+
2091+
# good - these methods don't support namespaced symbols
2092+
const_get("#{module_path}::Base")
2093+
const_source_location("#{module_path}::Base")
2094+
const_defined?("#{module_path}::Base")
20902095
----
20912096
20922097
== Performance/StringInclude

lib/rubocop/performance/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RuboCop
44
module Performance
55
# This module holds the RuboCop Performance version information.
66
module Version
7-
STRING = '1.20.1'
7+
STRING = '1.20.2'
88

99
def self.document_version
1010
STRING.match('\d+\.\d+').to_s

relnotes/v1.20.2.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### Bug fixes
2+
3+
* [#425](https://github.com/rubocop/rubocop-performance/issues/425): Fix a false positive for `Performance/StringIdentifierArgument` when using string interpolation with methods that don't support symbols with `::` inside them. ([@earlopain][])
4+
5+
[@earlopain]: https://github.com/earlopain

0 commit comments

Comments
 (0)