rubocop-ast 0.5.1 → 0.6.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/regexp_node.rb +8 -4
- 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: 35f0c94d6021f2223c413d1751c4e816346b740cf01663e5444325256ba987aa
|
|
4
|
+
data.tar.gz: 010a37da8da2e08bea4785821709b9e10cdedb02e133f33b1b8a12051939517e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac8387283324c91278d848e1411cdede002cda15d00e20d2a889a5f7b4b37eed217e05e5538cfc99dfd2022ea68afae87eb4698db9d58aef2e08f15f3e5930e2
|
|
7
|
+
data.tar.gz: 3505c65f6921744d681f226f9f2e476a662c2da564db8f2534dd53a5cd17d15a4eadf839e7bf8d9e4bd8d769f0351527ad1a53c7da5a11cc3dc6f4e760a7c955
|
|
@@ -14,12 +14,9 @@ module RuboCop
|
|
|
14
14
|
o: 0
|
|
15
15
|
}.freeze
|
|
16
16
|
|
|
17
|
-
# Note: The 'o' option is ignored.
|
|
18
|
-
#
|
|
19
17
|
# @return [Regexp] a regexp of this node
|
|
20
18
|
def to_regexp
|
|
21
|
-
|
|
22
|
-
Regexp.new(content, option)
|
|
19
|
+
Regexp.new(content, options)
|
|
23
20
|
end
|
|
24
21
|
|
|
25
22
|
# @return [RuboCop::AST::Node] a regopt node
|
|
@@ -27,6 +24,13 @@ module RuboCop
|
|
|
27
24
|
children.last
|
|
28
25
|
end
|
|
29
26
|
|
|
27
|
+
# Note: The 'o' option is ignored.
|
|
28
|
+
#
|
|
29
|
+
# @return [Integer] the Regexp option bits as returned by Regexp#options
|
|
30
|
+
def options
|
|
31
|
+
regopt.children.map { |opt| OPTIONS.fetch(opt) }.inject(0, :|)
|
|
32
|
+
end
|
|
33
|
+
|
|
30
34
|
# @return [String] a string of regexp content
|
|
31
35
|
def content
|
|
32
36
|
children.select(&:str_type?).map(&:str_content).join
|
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: 0.
|
|
4
|
+
version: 0.6.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: 2020-09-
|
|
13
|
+
date: 2020-09-26 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: parser
|