rubocop-performance 1.26.0 → 1.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65d9d36b4437bd92d054b743117d77b7fdb4f5391c012ae656b01dcd2ca2fa51
4
- data.tar.gz: 8678a0f7fac0c650fa4c51a25e8c3e06b049c67b5fb369719fe7eee2c04a8820
3
+ metadata.gz: c834e1a3af5e4cc42c7edd0dfe6bdb4e4cfc6e665e2235277f46b15cdb9ab720
4
+ data.tar.gz: a1e5d0efde3b42af4f7d6293e5595ca30df2d24d7cfb765d6ec87932a331d2ef
5
5
  SHA512:
6
- metadata.gz: d0efc235b893328de9dfb9a58a26bb5d4838b9919a2b0a06e77f1f34ad1b53d39433793b1dd24dc04d34e79047aa0ff5e4863d407a48160da6c35fc45d91906f
7
- data.tar.gz: 4aafa85fa2c326f532d16b338f55df55e67d9d52ebbd52196b53ae3520e7b30fdce7656081f716c91f6fe6ec3833915a6ac1bc0838d2c3016bfde6cb133689c0
6
+ metadata.gz: 127936d00884ae6749b2b5511466c09dd696662d02bd34b581582e71e3966f9228f4d8e8ff880db96ff7267023dbfd87a5121888e95c41afea930ee98f6d30c3
7
+ data.tar.gz: b6cc50f7db2771e41c6700238fe175a5273916ab7da2c3ab487648aa801d04914afa3f0564f67205d2eba436dc694d4cb011fee72e878dffc2c202bcf8a1f011
data/config/default.yml CHANGED
@@ -22,8 +22,9 @@ Performance/ArraySemiInfiniteRangeSlice:
22
22
 
23
23
  Performance/BigDecimalWithNumericArgument:
24
24
  Description: 'Convert numeric literal to string and pass it to `BigDecimal`.'
25
- Enabled: 'pending'
25
+ Enabled: false
26
26
  VersionAdded: '1.7'
27
+ VersionChanged: '1.26'
27
28
 
28
29
  Performance/BindCall:
29
30
  Description: 'Use `bind_call(obj, args, ...)` instead of `bind(obj).call(args, ...)`.'
@@ -39,7 +39,7 @@ module RuboCop
39
39
  RESTRICT_ON_SEND = SLICE_METHODS
40
40
 
41
41
  def_node_matcher :endless_range_slice?, <<~PATTERN
42
- (call $!{str dstr xstr} $%SLICE_METHODS $#endless_range?)
42
+ (call $!any_str $%SLICE_METHODS $#endless_range?)
43
43
  PATTERN
44
44
 
45
45
  def_node_matcher :endless_range?, <<~PATTERN
@@ -9,6 +9,11 @@ module RuboCop
9
9
  # Also identifies places where an integer string argument to BigDecimal should be converted to
10
10
  # an integer. Initializing from Integer is faster than from String for BigDecimal.
11
11
  #
12
+ # NOTE: This cop is disabled by default because the performance of initializing with a String
13
+ # and Number differ between versions. Additionally, performance depends on the size of the Number,
14
+ # and if it is an Integer or a Float. Since this is very specific to `bigdecimal` internals,
15
+ # suggestions from this cop are not unlikely to result in code that performs worse than before.
16
+ #
12
17
  # @example
13
18
  # # bad
14
19
  # BigDecimal(1.2, 3, exception: true)
@@ -54,6 +54,7 @@ module RuboCop
54
54
  def on_send(node)
55
55
  return unless (receiver, method, args = redundant_chars_call?(node))
56
56
  return if method == :last && !args.empty?
57
+ return if args.count == 2
57
58
 
58
59
  range = offense_range(receiver, node)
59
60
  message = build_message(method, args)
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Performance
5
5
  # This module holds the RuboCop Performance version information.
6
6
  module Version
7
- STRING = '1.26.0'
7
+ STRING = '1.26.1'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.0
4
+ version: 1.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
8
8
  - Jonas Arvidsson
9
9
  - Yuji Nakayama
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 1980-01-02 00:00:00.000000000 Z
13
+ date: 2025-10-18 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: lint_roller
@@ -51,7 +52,7 @@ dependencies:
51
52
  requirements:
52
53
  - - ">="
53
54
  - !ruby/object:Gem::Version
54
- version: 1.44.0
55
+ version: 1.47.1
55
56
  - - "<"
56
57
  - !ruby/object:Gem::Version
57
58
  version: '2.0'
@@ -61,7 +62,7 @@ dependencies:
61
62
  requirements:
62
63
  - - ">="
63
64
  - !ruby/object:Gem::Version
64
- version: 1.44.0
65
+ version: 1.47.1
65
66
  - - "<"
66
67
  - !ruby/object:Gem::Version
67
68
  version: '2.0'
@@ -149,6 +150,7 @@ metadata:
149
150
  bug_tracker_uri: https://github.com/rubocop/rubocop-performance/issues
150
151
  rubygems_mfa_required: 'true'
151
152
  default_lint_roller_plugin: RuboCop::Performance::Plugin
153
+ post_install_message:
152
154
  rdoc_options: []
153
155
  require_paths:
154
156
  - lib
@@ -163,7 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
165
  - !ruby/object:Gem::Version
164
166
  version: '0'
165
167
  requirements: []
166
- rubygems_version: 3.6.9
168
+ rubygems_version: 3.1.6
169
+ signing_key:
167
170
  specification_version: 4
168
171
  summary: Automatic performance checking tool for Ruby code.
169
172
  test_files: []