diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-18 15:43:35 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-18 15:43:35 +0900 |
| commit | c9c758d6ede1f99fa5c4bd20b26f4bce0b88c84e (patch) | |
| tree | 9dfdcd2db1f4a56659ea1b22d58aeb46bc5c90a3 /mrblib/array.rb | |
| parent | 4728070ec5104faf45d2a06a5b3e412c69f8a734 (diff) | |
| download | mruby-c9c758d6ede1f99fa5c4bd20b26f4bce0b88c84e.tar.gz mruby-c9c758d6ede1f99fa5c4bd20b26f4bce0b88c84e.zip | |
fixed wrong loop termination introduced by 79d38c4
Diffstat (limited to 'mrblib/array.rb')
| -rw-r--r-- | mrblib/array.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
