rubocop-ast 1.44.1 → 1.45.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: 9310771bd0730e0408e6db665c1f0db5d52ae370aa7eb761ac3942777f4d6cee
4
- data.tar.gz: ccd0f8b884bc0f3d8404e46db57cabd956ac8e808873ead64c4ba38a2d2387fe
3
+ metadata.gz: 521d7e1613b1073ddff48a0cbe4b9845082cbe146ec4526d7b3ffbea9682a289
4
+ data.tar.gz: 53f870c81fb23413c05b2d51968b2c5eef0160b0ff6dc0a5ce50b00a694f4629
5
5
  SHA512:
6
- metadata.gz: 74c053c8bcba554f9816b44b58f1d8b531c643d615961c9ffb56e79177d59a596477565b13d6317de7e7132dd7c70d9428ae8381a1757c9836073515edad8740
7
- data.tar.gz: cd6d7101a68f5ccb8657acf28d094c07a44bbd6312b8a381e16f34f8a4211929a00c26d6f5adced13ef7da085d704ffd8d303d7ae0ade38d41de0792aa5c6898
6
+ metadata.gz: fcea8269fce5fa28c1b99a176cf80c81899c929e6d8d195359a8d2841edf07a20920282aa54e0f37ad4fc606fccc8a6ffcd9769c47a14d737390456713581291
7
+ data.tar.gz: 7061c378e6de7e7e8fdbb9b95d986a0e5447ce52e717c70e588add642360cf95ae6aafb0a67f6c580e2a498e06d46cc4d0480a207d5c7e8465b7a3570329dd85
@@ -116,7 +116,10 @@ module RuboCop
116
116
 
117
117
  block: :any_block,
118
118
  numblock: :any_block,
119
- itblock: :any_block
119
+ itblock: :any_block,
120
+
121
+ match_pattern: :any_match_pattern,
122
+ match_pattern_p: :any_match_pattern
120
123
  }.freeze
121
124
  private_constant :GROUP_FOR_TYPE
122
125
 
@@ -540,6 +543,10 @@ module RuboCop
540
543
  GROUP_FOR_TYPE[type] == :any_block
541
544
  end
542
545
 
546
+ def any_match_pattern_type?
547
+ GROUP_FOR_TYPE[type] == :any_match_pattern
548
+ end
549
+
543
550
  def guard_clause?
544
551
  node = operator_keyword? ? rhs : self
545
552
 
@@ -15,10 +15,12 @@ module RuboCop
15
15
  @visit = {}
16
16
  end
17
17
 
18
+ # rubocop:disable Naming/PredicateMethod
18
19
  def enter(node_id)
19
20
  @visit[node_id] = false
20
21
  true
21
22
  end
23
+ # rubocop:enable Naming/PredicateMethod
22
24
 
23
25
  def success(node_id)
24
26
  @visit[node_id] = true
@@ -256,7 +256,8 @@ module RuboCop
256
256
  [ast, comments, tokens]
257
257
  end
258
258
 
259
- def parser_class(ruby_version, parser_engine) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
259
+ # rubocop:disable Lint/FloatComparison, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
260
+ def parser_class(ruby_version, parser_engine)
260
261
  case parser_engine
261
262
  when :parser_whitequark
262
263
  case ruby_version
@@ -323,6 +324,7 @@ module RuboCop
323
324
  end
324
325
  end
325
326
  end
327
+ # rubocop:enable Lint/FloatComparison, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
326
328
 
327
329
  def builder_class(parser_engine)
328
330
  case parser_engine
@@ -339,7 +341,7 @@ module RuboCop
339
341
 
340
342
  parser_class = parser_class(ruby_version, parser_engine)
341
343
 
342
- parser_instance = if prism_result
344
+ parser_instance = if parser_engine == :parser_prism && prism_result
343
345
  # NOTE: Since it is intended for use with Ruby LSP, it targets only Prism.
344
346
  # If there is no reuse of a pre-parsed result, such as in Ruby LSP,
345
347
  # regular parsing with Prism occurs, and `else` branch will be executed.
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.44.1'
6
+ STRING = '1.45.1'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.44.1
4
+ version: 1.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-04-11 00:00:00.000000000 Z
13
+ date: 2025-06-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser