lib/async/task.rb in async-1.2.0 vs lib/async/task.rb in async-1.2.1
- old
+ new
@@ -65,11 +65,11 @@
@status = :initialized
@result = nil
@condition = nil
- @fiber = Fiber.new do |args|
+ @fiber = Fiber.new do |*args|
set!
begin
@result = yield(self, *args)
@status = :complete
@@ -111,10 +111,10 @@
# Resume the execution of the task.
def run(*args)
if @status == :initialized
@status = :running
- @fiber.resume(args)
+ @fiber.resume(*args)
else
raise RuntimeError, "Task already running!"
end
end