diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-06 20:31:37 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-06 20:31:37 +0900 |
| commit | 950fe963ac99b33ccfc9c37ad4649e22467f4591 (patch) | |
| tree | 2ef666197fddf6977b6ba03ee6ef0f0d295246fd /mrbgems/mruby-enum-ext | |
| parent | 8808c9a31a3de44f10fd23a91d759ae75e0dc0ee (diff) | |
| download | mruby-950fe963ac99b33ccfc9c37ad4649e22467f4591.tar.gz mruby-950fe963ac99b33ccfc9c37ad4649e22467f4591.zip | |
should have passed args to to_enum
Diffstat (limited to 'mrbgems/mruby-enum-ext')
| -rw-r--r-- | mrbgems/mruby-enum-ext/mrblib/enum.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-enum-ext/mrblib/enum.rb b/mrbgems/mruby-enum-ext/mrblib/enum.rb index 0a18a3d35..22c793108 100644 --- a/mrbgems/mruby-enum-ext/mrblib/enum.rb +++ b/mrbgems/mruby-enum-ext/mrblib/enum.rb @@ -517,7 +517,7 @@ module Enumerable def each_with_object(obj=nil, &block) raise ArgumentError, "wrong number of arguments (0 for 1)" if obj == nil - return to_enum :each_with_object unless block_given? + return to_enum(:each_with_object, obj) unless block_given? self.each {|*val| block.call(val.__svalue, obj) } obj @@ -574,7 +574,7 @@ module Enumerable # def cycle(n=nil, &block) - return to_enum :cycle if !block_given? && n == nil + return to_enum(:cycle, n) if !block_given? && n == nil ary = [] if n == nil @@ -623,7 +623,7 @@ module Enumerable # def find_index(val=NONE, &block) - return to_enum :find_index if !block_given? && val == NONE + return to_enum(:find_index, val) if !block_given? && val == NONE idx = 0 if block |
