Prefer block pass over explicit block
This commit is contained in:
parent
8164de883e
commit
8c4e7cc665
1 changed files with 1 additions and 3 deletions
|
@ -38,9 +38,7 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def self.call(&block)
|
def self.call(&block)
|
||||||
Parallel.map([block], in_processes: 1) do
|
Parallel.map([block], in_processes: 1, &block.method(:call)).first
|
||||||
block.call
|
|
||||||
end.first
|
|
||||||
rescue Parallel::DeadWorker => exception
|
rescue Parallel::DeadWorker => exception
|
||||||
fail Error, exception
|
fail Error, exception
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue