loop() to return StopIteration#result; [ruby-bugs#11498]

parent 7278fd1f
...@@ -30,8 +30,8 @@ module Kernel ...@@ -30,8 +30,8 @@ module Kernel
while true while true
yield yield
end end
rescue StopIteration rescue StopIteration => e
nil e.result
end end
# 11.4.4 Step c) # 11.4.4 Step c)
......
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