rubocop-ast 1.11.0 → 1.12.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/README.md +4 -4
- data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +3 -3
- data/lib/rubocop/ast/node.rb +1 -1
- data/lib/rubocop/ast/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6043ea0138463f64f6f8dd79560174d914574a06d16a8c953b5abc608065c85e
|
4
|
+
data.tar.gz: cf4fc7024d88c9c0ecfb7b36c46780271c3a2fec6adc454746ab7451ea1f0670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a45cdf17944479b6917549b2d2d5668936d2cedaa8f2b4a4e379d5a2b997540f786245b1fc0a0a1e6d6aa35adbdb836a6cafeb0766ec1fb7d1d49c5e965edc28
|
7
|
+
data.tar.gz: 2e214311057599096809ebae598f5511fa7eb1ae416f577c3e9b8459508e7ab1093fc902cde16698b9e9f99d304a88afb4ac81286a6843c0152449fa1124a340
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# RuboCop AST
|
2
2
|
|
3
3
|
[](https://badge.fury.io/rb/rubocop-ast)
|
4
|
-
[](https://codeclimate.com/github/rubocop
|
6
|
-
[](https://codeclimate.com/github/rubocop
|
4
|
+
[](https://github.com/rubocop/rubocop-ast/actions?query=workflow%3ACI)
|
5
|
+
[](https://codeclimate.com/github/rubocop/rubocop-ast/test_coverage)
|
6
|
+
[](https://codeclimate.com/github/rubocop/rubocop-ast/maintainability)
|
7
7
|
|
8
|
-
Contains the classes needed by [RuboCop](https://github.com/rubocop
|
8
|
+
Contains the classes needed by [RuboCop](https://github.com/rubocop/rubocop) to deal with Ruby's AST, in particular:
|
9
9
|
|
10
10
|
* `RuboCop::AST::Node` ([doc](docs/modules/ROOT/pages/node_types.adoc))
|
11
11
|
* `RuboCop::AST::NodePattern` ([doc](docs/modules/ROOT/pages/node_pattern.adoc))
|
@@ -28,9 +28,9 @@ module RuboCop
|
|
28
28
|
node_parts[1]
|
29
29
|
end
|
30
30
|
|
31
|
-
# The `block` node associated with this method dispatch, if any.
|
31
|
+
# The `block` or `numblock` node associated with this method dispatch, if any.
|
32
32
|
#
|
33
|
-
# @return [BlockNode, nil] the `block` node associated with this method
|
33
|
+
# @return [BlockNode, nil] the `block` or `numblock` node associated with this method
|
34
34
|
# call or `nil`
|
35
35
|
def block_node
|
36
36
|
parent if block_literal?
|
@@ -154,7 +154,7 @@ module RuboCop
|
|
154
154
|
#
|
155
155
|
# @return [Boolean] whether the dispatched method has a block
|
156
156
|
def block_literal?
|
157
|
-
parent&.block_type? && eql?(parent.send_node)
|
157
|
+
(parent&.block_type? || parent&.numblock_type?) && eql?(parent.send_node)
|
158
158
|
end
|
159
159
|
|
160
160
|
# Checks whether this node is an arithmetic operation
|
data/lib/rubocop/ast/node.rb
CHANGED
@@ -425,7 +425,7 @@ module RuboCop
|
|
425
425
|
end
|
426
426
|
|
427
427
|
def keyword?
|
428
|
-
return true if special_keyword? || send_type? && prefix_not?
|
428
|
+
return true if special_keyword? || (send_type? && prefix_not?)
|
429
429
|
return false unless KEYWORDS.include?(type)
|
430
430
|
|
431
431
|
!OPERATOR_KEYWORDS.include?(type) || loc.operator.is?(type.to_s)
|
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.12.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: 2021-
|
13
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parser
|
@@ -150,15 +150,15 @@ files:
|
|
150
150
|
- lib/rubocop/ast/token.rb
|
151
151
|
- lib/rubocop/ast/traversal.rb
|
152
152
|
- lib/rubocop/ast/version.rb
|
153
|
-
homepage: https://github.com/rubocop
|
153
|
+
homepage: https://github.com/rubocop/rubocop-ast
|
154
154
|
licenses:
|
155
155
|
- MIT
|
156
156
|
metadata:
|
157
157
|
homepage_uri: https://www.rubocop.org/
|
158
|
-
changelog_uri: https://github.com/rubocop
|
159
|
-
source_code_uri: https://github.com/rubocop
|
158
|
+
changelog_uri: https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md
|
159
|
+
source_code_uri: https://github.com/rubocop/rubocop-ast/
|
160
160
|
documentation_uri: https://docs.rubocop.org/rubocop-ast/
|
161
|
-
bug_tracker_uri: https://github.com/rubocop
|
161
|
+
bug_tracker_uri: https://github.com/rubocop/rubocop-ast/issues
|
162
162
|
post_install_message:
|
163
163
|
rdoc_options: []
|
164
164
|
require_paths:
|