lib/em-synchrony/fiber_iterator.rb in em-synchrony-1.0.4 vs lib/em-synchrony/fiber_iterator.rb in em-synchrony-1.0.5

- old
+ new

@@ -5,10 +5,10 @@ # execute each iterator block within its own fiber # and auto-advance the iterator after each call def each(foreach=nil, after=nil, &blk) fe = Proc.new do |obj, iter| - Fiber.new { (foreach || blk).call(obj); iter.next }.resume + Fiber.new { (foreach || blk).call(obj, iter); iter.next }.resume end super(fe, after) end