rubocop-ast 1.19.1 → 1.21.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3042a6ea6c8061c98af6f9266c3c25753d9c6fa44da970def28268322e1a95d4
|
4
|
+
data.tar.gz: 6ca67765b5da2f93381655e0669eba37cfe9c12a81b8e29e0c3a57ce9fd98c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f2eb5ee0b03efc771f32464253980ac8bd4a583db82eb7e59f7b4784ac29cf22e63f118aff1493d215d60e4a9a25843912f72f8d11baea8554d4be1135e76b7
|
7
|
+
data.tar.gz: 2dfd094259a9585e0376034f21b8073736fa681799b16fd420511bea725878573e1e0aa3a52211dc5f3672e9812c440270727e7e4f06ffacaaa592c742ba37ae
|
@@ -249,7 +249,7 @@ module RuboCop
|
|
249
249
|
^{ # or the parent is...
|
250
250
|
sclass class module class_constructor? # a class-like node
|
251
251
|
[ { # or some "wrapper"
|
252
|
-
kwbegin begin block
|
252
|
+
kwbegin begin block numblock
|
253
253
|
(if _condition <%0 _>) # note: we're excluding the condition of `if` nodes
|
254
254
|
}
|
255
255
|
#in_macro_scope? # that is itself in a macro scope
|
@@ -11,6 +11,7 @@ module RuboCop
|
|
11
11
|
i: Regexp::IGNORECASE,
|
12
12
|
m: Regexp::MULTILINE,
|
13
13
|
n: Regexp::NOENCODING,
|
14
|
+
u: Regexp::FIXEDENCODING,
|
14
15
|
o: 0
|
15
16
|
}.freeze
|
16
17
|
private_constant :OPTIONS
|
@@ -87,6 +88,11 @@ module RuboCop
|
|
87
88
|
regopt_include?(:n)
|
88
89
|
end
|
89
90
|
|
91
|
+
# @return [Bool] if regexp uses the fixed-encoding regopt
|
92
|
+
def fixed_encoding?
|
93
|
+
regopt_include?(:u)
|
94
|
+
end
|
95
|
+
|
90
96
|
private
|
91
97
|
|
92
98
|
def regopt_include?(option)
|
data/lib/rubocop/ast/token.rb
CHANGED
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.
|
4
|
+
version: 1.21.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: 2022-
|
13
|
+
date: 2022-08-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parser
|