File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 613613# This type of objects can be created by Enumerable#chain and Enumerator#+.
614614#
615615class Enumerator::Chain [out Elem] < Enumerator[Elem, void ]
616- # * `Rubocop: `self` type is not allowed in this context
617- # * {Enumerator::Chain#each} without block doesn't return `self`, unlike {Enumerator#each}.
618- #include Enumerator::_Each[Enum, self] # Workaround: def each:
619-
620616 # <!--
621617 # rdoc-file=enumerator.c
622618 # - Enumerator::Chain.new(*enums) -> enum
@@ -641,10 +637,12 @@ class Enumerator::Chain[out Elem] < Enumerator[Elem, void]
641637 #
642638 # If no block is given, returns an enumerator.
643639 #
644- def each : () { (Enum ) -> void } -> self
645- | () -> Enumerator[E , self ]
640+ def each : () { (Elem ) -> void } -> self
641+ | () -> Enumerator[Elem , self ]
646642
647643 # wrong argument type chain (expected enumerator) (TypeError)
648644 def with_index : (?Integer) ?{ (?) -> untyped } -> bot
645+
646+ # wrong argument type chain (expected enumerator) (TypeError)
649647 def each_with_index : () ?{ (?) -> untyped } -> bot
650648end
You can’t perform that action at this time.
0 commit comments