diff options
Diffstat (limited to 'rubocop/cop/avoid_return_from_blocks.rb')
-rw-r--r-- | rubocop/cop/avoid_return_from_blocks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/avoid_return_from_blocks.rb b/rubocop/cop/avoid_return_from_blocks.rb index 61edfd0a789..c6a7a87c548 100644 --- a/rubocop/cop/avoid_return_from_blocks.rb +++ b/rubocop/cop/avoid_return_from_blocks.rb @@ -32,7 +32,7 @@ module RuboCop return unless top_block?(node) block_body.each_node(:return) do |return_node| - next if parent_blocks(node, return_node).all?(&method(:whitelisted?)) + next if parent_blocks(node, return_node).all? { |block_node| whitelisted?(block_node) } add_offense(return_node) end |