avoid block_given? in loop method for simplicity

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