rubocop-ast 1.36.1 → 1.36.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb157bc53c77f0b4583fe4a1fae816b2293db5a15a959f4fce65da9cea0d887f
4
- data.tar.gz: d3ebac2e11d25746a9b0a33815049848d7773049c69db74b4e667692e07f6189
3
+ metadata.gz: 07c76274a87f19afed0f78fd17a51276f0018b7d1771e762135102b4d52b5a5e
4
+ data.tar.gz: b1e0a8669b789f063b3a73cdddc6187ef65fa80e8af376a898d90003af988370
5
5
  SHA512:
6
- metadata.gz: b5810513b99608118aad971f53f3e88a535a3c6d281d3fe3a6a4615c3ec635697f377f610b30d230d2e529d39e84e0d48353bfaac44da2956c3c94716ec2740f
7
- data.tar.gz: 65ee46a6d28b659b967662dc971986b545044209dc879cfb6e1fe556c414754dccd13b8db01be73dbc168a1474bf8bf34b20dea768a4b84b7eef7e41bfce19e9
6
+ metadata.gz: 53acbd7b42693e94af37b5ec5e894c77416edabb7a5ad7cb9a4bc82f605dad8b6f324a41a68fe83cfe8227d4421fff4bba77c1b6c33d1234af7972b74a3e6f2f
7
+ data.tar.gz: d5723bec108faa1d19eff03b0fefb2f8eeefe885253f16180bedbde4589cba16db6dfd45d27bb82a0f14538e9c93416dd23756f0f79fa3d68ae67a7b3ff30c64
@@ -8,13 +8,15 @@ module RuboCop
8
8
  class MlhsNode < Node
9
9
  # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment.
10
10
  # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`)
11
- # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`.
11
+ # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`,
12
+ # or a `splat` node for `*, ... =`.
12
13
  #
13
14
  # @return [Array<Node>] the assignment nodes of the multiple assignment LHS
14
15
  def assignments
15
16
  child_nodes.flat_map do |node|
16
17
  if node.splat_type?
17
- node.child_nodes.first
18
+ # Anonymous splats have no children
19
+ node.child_nodes.first || node
18
20
  elsif node.mlhs_type?
19
21
  node.assignments
20
22
  else
@@ -529,7 +529,7 @@ module RuboCop
529
529
  end
530
530
 
531
531
  def guard_clause?
532
- node = and_type? || or_type? ? rhs : self
532
+ node = operator_keyword? ? rhs : self
533
533
 
534
534
  node.match_guard_clause?
535
535
  end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.36.1'
6
+ STRING = '1.36.2'
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.36.1
4
+ version: 1.36.2
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: 2024-11-13 00:00:00.000000000 Z
13
+ date: 2024-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser