rubocop-ast 1.43.0 → 1.44.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: 724e2118bf289e457d58db38594035fb1888100577cbc82ca6e7352b2d952d24
4
- data.tar.gz: 0f957ba53af55775cfa988490b2ea07db0022d9b3dba3d28c48a95aff64552ad
3
+ metadata.gz: 9310771bd0730e0408e6db665c1f0db5d52ae370aa7eb761ac3942777f4d6cee
4
+ data.tar.gz: ccd0f8b884bc0f3d8404e46db57cabd956ac8e808873ead64c4ba38a2d2387fe
5
5
  SHA512:
6
- metadata.gz: db7476e8bff5a7357b8722d6a48fd185ef296e10c9e69de6e8efd76e5f281e7ad8e4c18303df1415c8219359f17fe860742fd12ae3be726f8acdeacf9afed84f
7
- data.tar.gz: c06cf9bed363772ee88102f93685993025c03886d0f68b01d139d20c128fe4d3bd66707321431d559b75801ce84613f6c0ccf3bb19fad674482a377418134e53
6
+ metadata.gz: 74c053c8bcba554f9816b44b58f1d8b531c643d615961c9ffb56e79177d59a596477565b13d6317de7e7132dd7c70d9428ae8381a1757c9836073515edad8740
7
+ data.tar.gz: cd6d7101a68f5ccb8657acf28d094c07a44bbd6312b8a381e16f34f8a4211929a00c26d6f5adced13ef7da085d704ffd8d303d7ae0ade38d41de0792aa5c6898
@@ -200,8 +200,7 @@ module RuboCop
200
200
  arg = node.children[2]
201
201
 
202
202
  return unless node.send_type? && node.receiver.nil? && arg.is_a?(::AST::Node)
203
-
204
- return arg if arg.type?(:def, :defs)
203
+ return arg if arg.any_def_type?
205
204
 
206
205
  def_modifier(arg)
207
206
  end
@@ -271,7 +270,7 @@ module RuboCop
271
270
 
272
271
  # @!method adjacent_def_modifier?(node = self)
273
272
  def_node_matcher :adjacent_def_modifier?, <<~PATTERN
274
- (send nil? _ ({def defs} ...))
273
+ (send nil? _ (any_def ...))
275
274
  PATTERN
276
275
 
277
276
  # @!method bare_access_modifier_declaration?(node = self)
@@ -87,6 +87,9 @@ module RuboCop
87
87
 
88
88
  # @api private
89
89
  GROUP_FOR_TYPE = {
90
+ def: :any_def,
91
+ defs: :any_def,
92
+
90
93
  arg: :argument,
91
94
  optarg: :argument,
92
95
  restarg: :argument,
@@ -513,6 +516,10 @@ module RuboCop
513
516
  parent&.send_type? && parent.arguments.include?(self)
514
517
  end
515
518
 
519
+ def any_def_type?
520
+ GROUP_FOR_TYPE[type] == :any_def
521
+ end
522
+
516
523
  def argument_type?
517
524
  GROUP_FOR_TYPE[type] == :argument
518
525
  end
@@ -118,7 +118,7 @@ module RuboCop
118
118
  many_node_children = %i[dstr dsym xstr regexp array hash pair
119
119
  mlhs masgn or_asgn and_asgn rasgn mrasgn
120
120
  undef alias args super yield or and
121
- while_post until_post iflipflop eflipflop
121
+ while_post until_post
122
122
  match_with_lvasgn begin kwbegin return
123
123
  in_match match_alt break next
124
124
  match_as array_pattern array_pattern_with_tail
@@ -126,7 +126,7 @@ module RuboCop
126
126
  index indexasgn procarg0 kwargs]
127
127
  many_opt_node_children = %i[case rescue resbody ensure for when
128
128
  case_match in_pattern irange erange
129
- match_pattern match_pattern_p]
129
+ match_pattern match_pattern_p iflipflop eflipflop]
130
130
 
131
131
  ### Callbacks for above
132
132
  def_callback no_children
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.43.0'
6
+ STRING = '1.44.1'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.43.0
4
+ version: 1.44.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: 2025-03-25 00:00:00.000000000 Z
13
+ date: 2025-04-11 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: parser
@@ -161,6 +162,7 @@ metadata:
161
162
  documentation_uri: https://docs.rubocop.org/rubocop-ast/
162
163
  bug_tracker_uri: https://github.com/rubocop/rubocop-ast/issues
163
164
  rubygems_mfa_required: 'true'
165
+ post_install_message:
164
166
  rdoc_options: []
165
167
  require_paths:
166
168
  - lib
@@ -175,7 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
177
  - !ruby/object:Gem::Version
176
178
  version: '0'
177
179
  requirements: []
178
- rubygems_version: 3.6.2
180
+ rubygems_version: 3.5.11
181
+ signing_key:
179
182
  specification_version: 4
180
183
  summary: RuboCop tools to deal with Ruby code AST.
181
184
  test_files: []