mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
optimize from each to enumerator_block_call
This commit is contained in:
@@ -208,7 +208,7 @@ class Enumerator
|
||||
def with_object object
|
||||
return to_enum :with_object, object unless block_given?
|
||||
|
||||
each do |i|
|
||||
enumerator_block_call do |i|
|
||||
yield [i,object]
|
||||
end
|
||||
object
|
||||
|
||||
Reference in New Issue
Block a user