rubocop-ast 1.9.0 → 1.9.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 +4 -4
- data/lib/rubocop/ast/node.rb +5 -1
- data/lib/rubocop/ast/node_pattern/node.rb +1 -1
- data/lib/rubocop/ast/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c74f293f4bc64d882c585948fa1cadb54c207f6f21b1d46986751433c9e8f8e6
|
4
|
+
data.tar.gz: c2d80c9d76eab9d8e9dfc1bb5d7ba3ea99ec55edda6c57e63acf894730f12e9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48c641709f25b739e2fca2784601c50b0344c6ee5f23011b58795e118ebceb38488944fc3b7929b3ed62e0e79dff6cd279a5aac71e817a2c2c9624a9d15cc0d2
|
7
|
+
data.tar.gz: ae3bdbcb7bc6664ecaf11ec72c98a598a88ea6d5b4b021607564fb361cf1663071bc9286a38af21b576c1f5cfc0d884895f845d825a331dff0cf7f106f9d6396
|
data/lib/rubocop/ast/node.rb
CHANGED
@@ -317,7 +317,11 @@ module RuboCop
|
|
317
317
|
# returns nil if answer cannot be determined
|
318
318
|
ancestors = each_ancestor(:class, :module, :sclass, :casgn, :block)
|
319
319
|
result = ancestors.map do |ancestor|
|
320
|
-
parent_module_name_part(ancestor)
|
320
|
+
parent_module_name_part(ancestor) do |full_name|
|
321
|
+
return nil unless full_name
|
322
|
+
|
323
|
+
full_name
|
324
|
+
end
|
321
325
|
end.compact.reverse.join('::')
|
322
326
|
result.empty? ? 'Object' : result
|
323
327
|
end
|
@@ -54,7 +54,7 @@ module RuboCop
|
|
54
54
|
children_nodes.sum(&:nb_captures)
|
55
55
|
end
|
56
56
|
|
57
|
-
# @return [Boolean] returns
|
57
|
+
# @return [Boolean] returns wether it matches a variable number of elements
|
58
58
|
def variadic?
|
59
59
|
arity.is_a?(Range)
|
60
60
|
end
|
data/lib/rubocop/ast/version.rb
CHANGED
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.9.
|
4
|
+
version: 1.9.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: 2021-08-
|
13
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parser
|