mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Enumerable#cycle to return enumerator
This commit is contained in:
@@ -552,6 +552,8 @@ module Enumerable
|
||||
#
|
||||
|
||||
def cycle(n=nil, &block)
|
||||
return to_enum :cycle if !block_given? && n == nil
|
||||
|
||||
ary = []
|
||||
if n == nil
|
||||
self.each do|*val|
|
||||
|
||||
Reference in New Issue
Block a user