diff --git a/mrblib/array.rb b/mrblib/array.rb index cbeaa6783..a7c0f84cc 100644 --- a/mrblib/array.rb +++ b/mrblib/array.rb @@ -17,7 +17,7 @@ class Array idx = 0 while idx < length - block.call(self[idx]) + yield self[idx] idx += 1 end self @@ -37,7 +37,7 @@ class Array idx = 0 while idx < length - block.call(idx) + yield idx idx += 1 end self diff --git a/mrblib/numeric.rb b/mrblib/numeric.rb index 322afd409..b25513ef4 100644 --- a/mrblib/numeric.rb +++ b/mrblib/numeric.rb @@ -49,7 +49,7 @@ class Integer i = self.to_i while i >= num - block.call(i) + yield i i -= 1 end self @@ -74,7 +74,7 @@ class Integer i = 0 while i < self - block.call(i) + yield i i += 1 end self @@ -90,7 +90,7 @@ class Integer i = self.to_i while i <= num - block.call(i) + yield i i += 1 end self