From 8c4e7cc66545cf9179768006d4faf2433fd1f49e Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Mon, 11 Aug 2014 15:11:22 +0000 Subject: [PATCH] Prefer block pass over explicit block --- lib/mutant/isolation.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/mutant/isolation.rb b/lib/mutant/isolation.rb index 066b9025..7b29eff6 100644 --- a/lib/mutant/isolation.rb +++ b/lib/mutant/isolation.rb @@ -38,9 +38,7 @@ module Mutant # @api private # def self.call(&block) - Parallel.map([block], in_processes: 1) do - block.call - end.first + Parallel.map([block], in_processes: 1, &block.method(:call)).first rescue Parallel::DeadWorker => exception fail Error, exception end