fixed wrong loop termination introduced by 79d38c49

parent 4728070e
......@@ -11,7 +11,7 @@ class Array
# ISO 15.2.12.5.10
def each(&block)
idx, length = -1, self.length-1
while idx < length and length < self.length and length = self.length-1
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
......
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