diff --git a/mrblib/array.rb b/mrblib/array.rb index 56bf5ceb2..abbb38cb6 100644 --- a/mrblib/array.rb +++ b/mrblib/array.rb @@ -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