mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
check if array expands in each block
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ class Array
|
||||
# ISO 15.2.12.5.10
|
||||
def each(&block)
|
||||
idx, length = -1, self.length-1
|
||||
while(idx < length)
|
||||
while idx < length and length < self.length and length = self.length-1
|
||||
elm = self[idx += 1]
|
||||
unless elm
|
||||
if elm == nil and length >= self.length
|
||||
|
||||
Reference in New Issue
Block a user