rubocop-ast 1.30.0 → 1.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rubocop/ast/builder.rb +8 -0
- data/lib/rubocop/ast/node/array_node.rb +6 -2
- data/lib/rubocop/ast/node/asgn_node.rb +2 -0
- data/lib/rubocop/ast/node/block_node.rb +2 -2
- data/lib/rubocop/ast/node/casgn_node.rb +4 -12
- data/lib/rubocop/ast/node/const_node.rb +1 -52
- data/lib/rubocop/ast/node/def_node.rb +1 -1
- data/lib/rubocop/ast/node/ensure_node.rb +23 -0
- data/lib/rubocop/ast/node/for_node.rb +1 -1
- data/lib/rubocop/ast/node/hash_node.rb +1 -1
- data/lib/rubocop/ast/node/if_node.rb +8 -1
- data/lib/rubocop/ast/node/in_pattern_node.rb +1 -1
- data/lib/rubocop/ast/node/keyword_begin_node.rb +44 -0
- data/lib/rubocop/ast/node/masgn_node.rb +63 -0
- data/lib/rubocop/ast/node/mixin/basic_literal_node.rb +1 -1
- data/lib/rubocop/ast/node/mixin/collection_node.rb +1 -1
- data/lib/rubocop/ast/node/mixin/constant_node.rb +62 -0
- data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +4 -4
- data/lib/rubocop/ast/node/mixin/numeric_node.rb +1 -1
- data/lib/rubocop/ast/node/mixin/parameterized_node.rb +1 -1
- data/lib/rubocop/ast/node/mlhs_node.rb +29 -0
- data/lib/rubocop/ast/node/op_asgn_node.rb +3 -1
- data/lib/rubocop/ast/node/rational_node.rb +13 -0
- data/lib/rubocop/ast/node/str_node.rb +37 -1
- data/lib/rubocop/ast/node/until_node.rb +1 -1
- data/lib/rubocop/ast/node/var_node.rb +15 -0
- data/lib/rubocop/ast/node/when_node.rb +1 -1
- data/lib/rubocop/ast/node/while_node.rb +1 -1
- data/lib/rubocop/ast/node.rb +88 -32
- data/lib/rubocop/ast/node_pattern/compiler/binding.rb +3 -3
- data/lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb +2 -3
- data/lib/rubocop/ast/node_pattern/compiler.rb +1 -1
- data/lib/rubocop/ast/node_pattern/lexer.rex.rb +1 -2
- data/lib/rubocop/ast/node_pattern/node.rb +1 -2
- data/lib/rubocop/ast/node_pattern/parser.racc.rb +2 -2
- data/lib/rubocop/ast/node_pattern/parser.rb +1 -1
- data/lib/rubocop/ast/node_pattern.rb +1 -1
- data/lib/rubocop/ast/processed_source.rb +89 -59
- data/lib/rubocop/ast/token.rb +1 -1
- data/lib/rubocop/ast/traversal.rb +2 -2
- data/lib/rubocop/ast/utilities/simple_forwardable.rb +16 -0
- data/lib/rubocop/ast/version.rb +1 -1
- data/lib/rubocop/ast.rb +7 -1
- metadata +13 -7
- data/lib/rubocop/ast/ext/range_min_max.rb +0 -18
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.
|
4
|
+
version: 1.37.0
|
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:
|
13
|
+
date: 2024-12-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parser
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
21
|
+
version: 3.3.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 3.
|
28
|
+
version: 3.3.1.0
|
29
29
|
description: " RuboCop's Node and NodePattern classes.\n"
|
30
30
|
email: rubocop@googlegroups.com
|
31
31
|
executables: []
|
@@ -40,7 +40,6 @@ files:
|
|
40
40
|
- lib/rubocop/ast.rb
|
41
41
|
- lib/rubocop/ast/builder.rb
|
42
42
|
- lib/rubocop/ast/ext/range.rb
|
43
|
-
- lib/rubocop/ast/ext/range_min_max.rb
|
44
43
|
- lib/rubocop/ast/node.rb
|
45
44
|
- lib/rubocop/ast/node/alias_node.rb
|
46
45
|
- lib/rubocop/ast/node/and_asgn_node.rb
|
@@ -70,12 +69,15 @@ files:
|
|
70
69
|
- lib/rubocop/ast/node/index_node.rb
|
71
70
|
- lib/rubocop/ast/node/indexasgn_node.rb
|
72
71
|
- lib/rubocop/ast/node/int_node.rb
|
72
|
+
- lib/rubocop/ast/node/keyword_begin_node.rb
|
73
73
|
- lib/rubocop/ast/node/keyword_splat_node.rb
|
74
74
|
- lib/rubocop/ast/node/lambda_node.rb
|
75
|
+
- lib/rubocop/ast/node/masgn_node.rb
|
75
76
|
- lib/rubocop/ast/node/mixin/basic_literal_node.rb
|
76
77
|
- lib/rubocop/ast/node/mixin/binary_operator_node.rb
|
77
78
|
- lib/rubocop/ast/node/mixin/collection_node.rb
|
78
79
|
- lib/rubocop/ast/node/mixin/conditional_node.rb
|
80
|
+
- lib/rubocop/ast/node/mixin/constant_node.rb
|
79
81
|
- lib/rubocop/ast/node/mixin/descendence.rb
|
80
82
|
- lib/rubocop/ast/node/mixin/hash_element_node.rb
|
81
83
|
- lib/rubocop/ast/node/mixin/method_dispatch_node.rb
|
@@ -84,6 +86,7 @@ files:
|
|
84
86
|
- lib/rubocop/ast/node/mixin/numeric_node.rb
|
85
87
|
- lib/rubocop/ast/node/mixin/parameterized_node.rb
|
86
88
|
- lib/rubocop/ast/node/mixin/predicate_operator_node.rb
|
89
|
+
- lib/rubocop/ast/node/mlhs_node.rb
|
87
90
|
- lib/rubocop/ast/node/module_node.rb
|
88
91
|
- lib/rubocop/ast/node/next_node.rb
|
89
92
|
- lib/rubocop/ast/node/op_asgn_node.rb
|
@@ -92,6 +95,7 @@ files:
|
|
92
95
|
- lib/rubocop/ast/node/pair_node.rb
|
93
96
|
- lib/rubocop/ast/node/procarg0_node.rb
|
94
97
|
- lib/rubocop/ast/node/range_node.rb
|
98
|
+
- lib/rubocop/ast/node/rational_node.rb
|
95
99
|
- lib/rubocop/ast/node/regexp_node.rb
|
96
100
|
- lib/rubocop/ast/node/resbody_node.rb
|
97
101
|
- lib/rubocop/ast/node/rescue_node.rb
|
@@ -102,6 +106,7 @@ files:
|
|
102
106
|
- lib/rubocop/ast/node/super_node.rb
|
103
107
|
- lib/rubocop/ast/node/symbol_node.rb
|
104
108
|
- lib/rubocop/ast/node/until_node.rb
|
109
|
+
- lib/rubocop/ast/node/var_node.rb
|
105
110
|
- lib/rubocop/ast/node/when_node.rb
|
106
111
|
- lib/rubocop/ast/node/while_node.rb
|
107
112
|
- lib/rubocop/ast/node/yield_node.rb
|
@@ -130,6 +135,7 @@ files:
|
|
130
135
|
- lib/rubocop/ast/sexp.rb
|
131
136
|
- lib/rubocop/ast/token.rb
|
132
137
|
- lib/rubocop/ast/traversal.rb
|
138
|
+
- lib/rubocop/ast/utilities/simple_forwardable.rb
|
133
139
|
- lib/rubocop/ast/version.rb
|
134
140
|
homepage: https://github.com/rubocop/rubocop-ast
|
135
141
|
licenses:
|
@@ -149,14 +155,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
155
|
requirements:
|
150
156
|
- - ">="
|
151
157
|
- !ruby/object:Gem::Version
|
152
|
-
version: 2.
|
158
|
+
version: 2.7.0
|
153
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
160
|
requirements:
|
155
161
|
- - ">="
|
156
162
|
- !ruby/object:Gem::Version
|
157
163
|
version: '0'
|
158
164
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
165
|
+
rubygems_version: 3.5.11
|
160
166
|
signing_key:
|
161
167
|
specification_version: 4
|
162
168
|
summary: RuboCop tools to deal with Ruby code AST.
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module AST
|
5
|
-
module Ext
|
6
|
-
# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6-
|
7
|
-
module RangeMinMax
|
8
|
-
if ::Range.instance_method(:minmax).owner != ::Range
|
9
|
-
refine ::Range do
|
10
|
-
def minmax
|
11
|
-
[min, max]
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|