From c9c758d6ede1f99fa5c4bd20b26f4bce0b88c84e Mon Sep 17 00:00:00 2001 From: Yukihiro Matz Matsumoto Date: Fri, 18 Jan 2013 15:43:35 +0900 Subject: fixed wrong loop termination introduced by 79d38c4 --- mrblib/array.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrblib/array.rb') 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 -- cgit v1.2.3