Replace `loop` method with `while true` loop to gain performance.

parent 5489fae8
......@@ -587,8 +587,12 @@ class Enumerator
val = init
y.yield(val)
end
loop do
y.yield(val = block.call(val))
begin
while true
y.yield(val = block.call(val))
end
rescue StopIteration
# do nothing
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment