avoid block_given? in loop method for simplicity

parent f01882a8
......@@ -24,8 +24,8 @@ module Kernel
# Calls the given block repetitively.
#
# ISO 15.3.1.3.29
def loop
return to_enum :loop unless block_given?
def loop(&block)
return to_enum :loop unless block
while(true)
yield
......
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