diff --git a/mrbgems/mruby-array-ext/mrblib/array.rb b/mrbgems/mruby-array-ext/mrblib/array.rb index cdc2e0226..f1f5840e2 100644 --- a/mrbgems/mruby-array-ext/mrblib/array.rb +++ b/mrbgems/mruby-array-ext/mrblib/array.rb @@ -62,7 +62,7 @@ class Array # for efficiency def reverse_each(&block) - return to_enum :reverse_each unless block + return to_enum(:reverse_each) unless block i = self.size - 1 while i>=0 @@ -187,7 +187,7 @@ class Array # scores.delete_if {|score| score < 80 } #=> [97] def delete_if(&block) - return to_enum :delete_if unless block + return to_enum(:delete_if) unless block result = [] idx = 0 @@ -217,7 +217,7 @@ class Array # If no block is given, an Enumerator is returned instead. def reject!(&block) - return to_enum :reject! unless block + return to_enum(:reject!) unless block result = [] idx = 0 @@ -288,7 +288,7 @@ class Array # undefined which value is actually picked up at each iteration. def bsearch(&block) - return to_enum :bsearch unless block + return to_enum(:bsearch) unless block if idx = bsearch_index(&block) self[idx] @@ -310,7 +310,7 @@ class Array # element itself. For more details consult the documentation for #bsearch. def bsearch_index(&block) - return to_enum :bsearch_index unless block + return to_enum(:bsearch_index) unless block low = 0 high = size @@ -360,7 +360,7 @@ class Array # a.keep_if { |val| val > 3 } #=> [4, 5] def keep_if(&block) - return to_enum :keep_if unless block + return to_enum(:keep_if) unless block result = [] idx = 0 @@ -389,7 +389,7 @@ class Array # If no block is given, an Enumerator is returned instead. def select!(&block) - return to_enum :select! unless block + return to_enum(:select!) unless block result = [] idx = 0