Skip to content

Commit 85363f5

Browse files
committed
Add type for Enumerator::Chain::new
1 parent d421a15 commit 85363f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/enumerator.rbs

+4-1
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ end
615615
class Enumerator::Chain[out Elem] < Enumerator[Elem, void]
616616
include Enumerable[Elem]
617617

618+
def initialize: (**_Each[Elem] enums) -> void
619+
618620
# <!--
619621
# rdoc-file=enumerator.c
620622
# - obj.each(*args) { |...| ... } -> obj
@@ -626,5 +628,6 @@ class Enumerator::Chain[out Elem] < Enumerator[Elem, void]
626628
#
627629
# If no block is given, returns an enumerator.
628630
#
629-
def each: () { (Elem) -> void } -> void
631+
def each: () -> Enumerator[Elem, self]
632+
| ...
630633
end

0 commit comments

Comments
 (0)