rubocop-ast 1.19.0 → 1.20.1

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: e2940fc0009d2a8c22394b0dfdff3d48e28dcb9b696b5eaabcac8efefcc4e479
4
- data.tar.gz: 3a42602c36dfffbe35474ab9431dbf2437e22d5b4c3b485fce79c1e12868ff2c
3
+ metadata.gz: 9ba8fd9e8c9903ca9522fe001ffe0f1d4b678d6d726240452962d610c5fd5b11
4
+ data.tar.gz: ec1bd5ddb6974f82b3bc1ed8abec8b3a63e195c6685fc065dd751d38831b8d15
5
5
  SHA512:
6
- metadata.gz: 19d3856b627d85f6636619c7517220f3882e3aecd5f7daaefd9c7ef98d773dd535e86b3754f29d33364926c2d8ce4daf6ad936542c0a185a30a7996aea18de07
7
- data.tar.gz: 2aab89172bbca7244c06ca1950dc5c2cb5868e3454d507c6ae1c2ecf545d3a0ce77b0bedaaa69f39823a1fc066914d4fb731f4e911aa706eeff0f8aa1d790ec1
6
+ metadata.gz: 0fdf074ad777bb2aa6b3e94bcdd78ba9486908b1f21659a5c2818de837ed8b50bcebf581181484a9a4bf636f5b46a0433136549ad788343a5019668e98fb71d3
7
+ data.tar.gz: 6a281cddaae5c392f9dc7dcce2449fc0da9a4d3c568628955e73f687a9bd7ca99ca7baa858a2b28ee5d4b1cf4a388fd14ff0e38c06756d3ec2fc6e6379baad8d
@@ -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)
@@ -100,7 +100,7 @@ module RuboCop
100
100
  type == :tCOMMA
101
101
  end
102
102
 
103
- def regexp_dot?
103
+ def regexp_dots?
104
104
  %i[tDOT2 tDOT3].include?(type)
105
105
  end
106
106
 
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.19.0'
6
+ STRING = '1.20.1'
7
7
  end
8
8
  end
9
9
  end
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.19.0
4
+ version: 1.20.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: 2022-07-09 00:00:00.000000000 Z
13
+ date: 2022-08-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser