rubocop-ast 1.12.0 → 1.15.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: 6043ea0138463f64f6f8dd79560174d914574a06d16a8c953b5abc608065c85e
4
- data.tar.gz: cf4fc7024d88c9c0ecfb7b36c46780271c3a2fec6adc454746ab7451ea1f0670
3
+ metadata.gz: 81689137631e287fd256ecec1afe9ce91033dcb77663f11c7a7d06a778630b9c
4
+ data.tar.gz: 6bfab6b417e2318d0a3d8d0ae5df70ce06de90a9826b39a00ba17c00a88021aa
5
5
  SHA512:
6
- metadata.gz: a45cdf17944479b6917549b2d2d5668936d2cedaa8f2b4a4e379d5a2b997540f786245b1fc0a0a1e6d6aa35adbdb836a6cafeb0766ec1fb7d1d49c5e965edc28
7
- data.tar.gz: 2e214311057599096809ebae598f5511fa7eb1ae416f577c3e9b8459508e7ab1093fc902cde16698b9e9f99d304a88afb4ac81286a6843c0152449fa1124a340
6
+ metadata.gz: 50af89026c7e223a9ba293bdbe7d129586793dfbc853eba03e813f5f37d2b1baeffd3bfccc2b8b68e3f8b927d250ec8cf258d12cf7816a6580f80345fd00a9d2
7
+ data.tar.gz: 23ac600eb4d70e3cf2d978ecfa85e966dfc9ccc3347cff3e26d6862508a1a63bae483a56f3f21b60c9fb32cea250d47ec503f5b311492f9c641c99c1754d9f05
@@ -6,9 +6,9 @@ module RuboCop
6
6
  # node when the builder constructs the AST, making its methods available
7
7
  # to all `class` nodes within RuboCop.
8
8
  class ClassNode < Node
9
- # The identifer for this `class` node.
9
+ # The identifier for this `class` node.
10
10
  #
11
- # @return [Node] the identifer of the class
11
+ # @return [Node] the identifier of the class
12
12
  def identifier
13
13
  node_parts[0]
14
14
  end
@@ -171,7 +171,7 @@ module RuboCop
171
171
  #
172
172
  # private def foo; end
173
173
  #
174
- # @return wether the `def|defs` node is a modifier or not.
174
+ # @return whether the `def|defs` node is a modifier or not.
175
175
  # See also `def_modifier` that returns the node or `nil`
176
176
  def def_modifier?(node = self)
177
177
  !!def_modifier(node)
@@ -6,9 +6,9 @@ module RuboCop
6
6
  # plain node when the builder constructs the AST, making its methods
7
7
  # available to all `module` nodes within RuboCop.
8
8
  class ModuleNode < Node
9
- # The identifer for this `module` node.
9
+ # The identifier for this `module` node.
10
10
  #
11
- # @return [Node] the identifer of the module
11
+ # @return [Node] the identifier of the module
12
12
  def identifier
13
13
  node_parts[0]
14
14
  end
@@ -62,6 +62,13 @@ module RuboCop
62
62
  def value_on_new_line?
63
63
  key.loc.line != value.loc.line
64
64
  end
65
+
66
+ # Checks whether the `pair` uses hash value omission.
67
+ #
68
+ # @return [Boolean] whether this `pair` uses hash value omission
69
+ def value_omission?
70
+ source.end_with?(':')
71
+ end
65
72
  end
66
73
  end
67
74
  end
@@ -6,9 +6,9 @@ module RuboCop
6
6
  # plain node when the builder constructs the AST, making its methods
7
7
  # available to all `sclass` nodes within RuboCop.
8
8
  class SelfClassNode < Node
9
- # The identifer for this `sclass` node. (Always `self`.)
9
+ # The identifier for this `sclass` node. (Always `self`.)
10
10
  #
11
- # @return [Node] the identifer of the class
11
+ # @return [Node] the identifier of the class
12
12
  def identifier
13
13
  node_parts[0]
14
14
  end
@@ -274,7 +274,7 @@ module RuboCop
274
274
 
275
275
  # @!method receiver(node = self)
276
276
  def_node_matcher :receiver, <<~PATTERN
277
- {(send $_ ...) ({block numblock} (send $_ ...) ...)}
277
+ {(send $_ ...) ({block numblock} (call $_ ...) ...)}
278
278
  PATTERN
279
279
 
280
280
  # @!method str_content(node = self)
@@ -464,7 +464,7 @@ module RuboCop
464
464
  end
465
465
 
466
466
  def numeric_type?
467
- int_type? || float_type?
467
+ int_type? || float_type? || rational_type? || complex_type?
468
468
  end
469
469
 
470
470
  def range_type?
@@ -2,7 +2,7 @@
2
2
  # encoding: UTF-8
3
3
  #--
4
4
  # This file is automatically generated. Do not modify it.
5
- # Generated by: oedipus_lex version 2.5.2.
5
+ # Generated by: oedipus_lex version 2.6.0.
6
6
  # Source: lib/rubocop/ast/node_pattern/lexer.rex
7
7
  #++
8
8
 
@@ -91,11 +91,10 @@ module RuboCop
91
91
 
92
92
  many_symbol_children = %i[regopt]
93
93
 
94
- node_child = %i[block_pass not
95
- match_current_line defined?
94
+ node_child = %i[not match_current_line defined?
96
95
  arg_expr pin if_guard unless_guard
97
96
  match_with_trailing_comma]
98
- node_or_nil_child = %i[preexe postexe]
97
+ node_or_nil_child = %i[block_pass preexe postexe]
99
98
 
100
99
  NO_CHILD_NODES = (no_children + opt_symbol_child + literal_child).to_set.freeze
101
100
  private_constant :NO_CHILD_NODES # Used by Commissioner
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.12.0'
6
+ STRING = '1.15.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.12.0
4
+ version: 1.15.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: 2021-09-28 00:00:00.000000000 Z
13
+ date: 2021-12-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser
@@ -159,6 +159,7 @@ metadata:
159
159
  source_code_uri: https://github.com/rubocop/rubocop-ast/
160
160
  documentation_uri: https://docs.rubocop.org/rubocop-ast/
161
161
  bug_tracker_uri: https://github.com/rubocop/rubocop-ast/issues
162
+ rubygems_mfa_required: 'true'
162
163
  post_install_message:
163
164
  rdoc_options: []
164
165
  require_paths: