Skip to content

Commit 428a452

Browse files
committed
Use Node#any_block_type?
Follow up rubocop/rubocop-ast#356.
1 parent 27c9a21 commit 428a452

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rubocop/cop/rails/pluck.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Pluck < Base
5656
minimum_target_rails_version 5.0
5757

5858
def_node_matcher :pluck_candidate?, <<~PATTERN
59-
({block numblock} (call _ {:map :collect}) $_argument (send lvar :[] $_key))
59+
(any_block (call _ {:map :collect}) $_argument (send lvar :[] $_key))
6060
PATTERN
6161

6262
def on_block(node)

rubocop-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ Gem::Specification.new do |s|
3636
# introduced in rack 1.1
3737
s.add_dependency 'rack', '>= 1.1'
3838
s.add_dependency 'rubocop', '>= 1.52.0', '< 2.0'
39-
s.add_dependency 'rubocop-ast', '>= 1.31.1', '< 2.0'
39+
s.add_dependency 'rubocop-ast', '>= 1.38.0', '< 2.0'
4040
end

0 commit comments

Comments
 (0)