mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #6264 from dearblue/to_enum
Must pass keyword arguments for `Kernel#to_enum`
This commit is contained in:
@@ -659,8 +659,8 @@ module Kernel
|
||||
# # => returns an Enumerator when called without a block
|
||||
# enum.first(4) # => [1, 1, 1, 2]
|
||||
#
|
||||
def to_enum(meth=:each, *args)
|
||||
Enumerator.new self, meth, *args
|
||||
def to_enum(meth=:each, *args, **kwd)
|
||||
Enumerator.new self, meth, *args, **kwd
|
||||
end
|
||||
alias enum_for to_enum
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user