mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
avoid block_given? in loop method for simplicity
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user