From 62d11996fc54d969a82be65d85c636e7353b13d8 Mon Sep 17 00:00:00 2001 From: Benjamin Quorning Date: Sun, 26 Dec 2021 07:10:53 +0100 Subject: [PATCH] Fix RedundantMethodDispatchNode offense InternalAffairs/RedundantMethodDispatchNode cop was added in https://github.com/rubocop/rubocop/pull/10312 --- lib/rubocop/cop/rspec/factory_bot/create_list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/rspec/factory_bot/create_list.rb b/lib/rubocop/cop/rspec/factory_bot/create_list.rb index 964eb37bb..2f580e44b 100644 --- a/lib/rubocop/cop/rspec/factory_bot/create_list.rb +++ b/lib/rubocop/cop/rspec/factory_bot/create_list.rb @@ -161,7 +161,7 @@ def call(corrector) def call_with_block_replacement(node) block = node.body arguments = build_arguments(block, node.receiver.source) - replacement = format_receiver(block.send_node.receiver) + replacement = format_receiver(block.receiver) replacement += format_method_call(block, 'create_list', arguments) replacement += format_block(block) replacement