diff --git a/lib/fasterer/scanners/method_call_scanner.rb b/lib/fasterer/scanners/method_call_scanner.rb index f9bc57c..52f3bf0 100644 --- a/lib/fasterer/scanners/method_call_scanner.rb +++ b/lib/fasterer/scanners/method_call_scanner.rb @@ -132,7 +132,7 @@ def check_symbol_to_proc return unless body_method_call.arguments.count.zero? return if body_method_call.has_block? return if body_method_call.receiver.nil? - return unless body_method_call.receiver.name == method_call.block_argument_names.first + return if body_method_call.receiver.name != method_call.block_argument_names.first add_offense(:block_vs_symbol_to_proc) end