rubocop-ast 1.25.0 → 1.26.0
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 +8 -2
- data/lib/rubocop/ast/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc10e7c795dab5de6b3af9e4256ac4312e5c3593dac55ac4bf290386813d8375
|
4
|
+
data.tar.gz: 4f5712401b5ce837a33b44a9e1e5061ca134fe794a04a9bdb46d7941564be73d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db2491014949e08395d008635c29a22d56b6495d020adc3ecc83071bf9f8614be7ff00088a69e82cc4add3ea118a71a28f3903ed3905012312191988cb61ec92
|
7
|
+
data.tar.gz: 7ba42b76e1fa3721ac7d41e83d9ad4a87ec214c02938af1b6f2162e80ec55a4706698bee254591cdf50c3467648a95d972ad615fc559f0e8669a8de64552aa83
|
data/lib/rubocop/ast/node.rb
CHANGED
@@ -510,8 +510,14 @@ module RuboCop
|
|
510
510
|
|
511
511
|
# @!method class_constructor?(node = self)
|
512
512
|
def_node_matcher :class_constructor?, <<~PATTERN
|
513
|
-
{
|
514
|
-
|
513
|
+
{
|
514
|
+
(send #global_const?({:Class :Module :Struct}) :new ...)
|
515
|
+
(send #global_const?(:Data) :define ...)
|
516
|
+
({block numblock} {
|
517
|
+
(send #global_const?({:Class :Module :Struct}) :new ...)
|
518
|
+
(send #global_const?(:Data) :define ...)
|
519
|
+
} ...)
|
520
|
+
}
|
515
521
|
PATTERN
|
516
522
|
|
517
523
|
# @deprecated Use `:class_constructor?`
|
data/lib/rubocop/ast/version.rb
CHANGED