lib/worker.rb in worker-0.2.0 vs lib/worker.rb in worker-0.3.0

- old
+ new

@@ -11,10 +11,11 @@ run! end def perform(*args) @in.push args + ret = @out.pop if ret.is_a? Exception raise ret else ret @@ -22,10 +23,10 @@ end def run! @thread = Thread.new do loop do - ret = @ctx.instance_exec @in.pop, &@block + ret = @ctx.instance_exec *@in.pop, &@block @out.push ret rescue Exception => ex @out.push ex end end