rubocop-ast 1.11.0 → 1.12.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: fc07fcefa159e288e9bfe924e4f974841ce03bc2bd46cca4baf4ea600296b2e8
4
- data.tar.gz: 7e0eaf77c2f769a2ed491c171b591e53c6e14744d197616792fc45d9b063a9f9
3
+ metadata.gz: 6043ea0138463f64f6f8dd79560174d914574a06d16a8c953b5abc608065c85e
4
+ data.tar.gz: cf4fc7024d88c9c0ecfb7b36c46780271c3a2fec6adc454746ab7451ea1f0670
5
5
  SHA512:
6
- metadata.gz: 5795ea28b4acae46dfe11ccfbd596c87ef0edc9ee20d2a248979bcbbeabefdf812d7a981f9ad648879730114767019a0e894894a6154c456e39fbe0ea9562c29
7
- data.tar.gz: 5395f0a9f747811636ed1f62d0aecdd43d18d2aac7d00b550a40c81a2f82feb082ad62b381265e9b803df5eef21f15fa3f10d51d3ca2b76517356d338ec94dc4
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
  [![Gem Version](https://badge.fury.io/rb/rubocop-ast.svg)](https://badge.fury.io/rb/rubocop-ast)
4
- [![CI](https://github.com/rubocop-hq/rubocop-ast/workflows/CI/badge.svg)](https://github.com/rubocop-hq/rubocop-ast/actions?query=workflow%3ACI)
5
- [![Test Coverage](https://api.codeclimate.com/v1/badges/a29666e6373bc41bc0a9/test_coverage)](https://codeclimate.com/github/rubocop-hq/rubocop-ast/test_coverage)
6
- [![Maintainability](https://api.codeclimate.com/v1/badges/a29666e6373bc41bc0a9/maintainability)](https://codeclimate.com/github/rubocop-hq/rubocop-ast/maintainability)
4
+ [![CI](https://github.com/rubocop/rubocop-ast/workflows/CI/badge.svg)](https://github.com/rubocop/rubocop-ast/actions?query=workflow%3ACI)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/a29666e6373bc41bc0a9/test_coverage)](https://codeclimate.com/github/rubocop/rubocop-ast/test_coverage)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/a29666e6373bc41bc0a9/maintainability)](https://codeclimate.com/github/rubocop/rubocop-ast/maintainability)
7
7
 
8
- Contains the classes needed by [RuboCop](https://github.com/rubocop-hq/rubocop) to deal with Ruby's AST, in particular:
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
@@ -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)
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.11.0'
6
+ STRING = '1.12.0'
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.11.0
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-08-24 00:00:00.000000000 Z
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-hq/rubocop-ast
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-hq/rubocop-ast/blob/master/CHANGELOG.md
159
- source_code_uri: https://github.com/rubocop-hq/rubocop-ast/
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-hq/rubocop-ast/issues
161
+ bug_tracker_uri: https://github.com/rubocop/rubocop-ast/issues
162
162
  post_install_message:
163
163
  rdoc_options: []
164
164
  require_paths: