Skip to content

Commit

Permalink
Kernel#loop rescues StopIteration
Browse files Browse the repository at this point in the history
  • Loading branch information
begriffs committed Jun 1, 2012
1 parent 6364d8a commit 88fd993
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/itertools/terminating_iterators.rb
Expand Up @@ -15,10 +15,7 @@ def iter obj
def chain *fibers
Fiber.new do
for f in fibers
begin
loop { Fiber.yield f.resume }
rescue StopIteration
end
loop { Fiber.yield f.resume }
end
raise StopIteration
end
Expand Down

0 comments on commit 88fd993

Please sign in to comment.