File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 613
613
# This type of objects can be created by Enumerable#chain and Enumerator#+.
614
614
#
615
615
class 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
-
620
616
# <!--
621
617
# rdoc-file=enumerator.c
622
618
# - Enumerator::Chain.new(*enums) -> enum
@@ -641,10 +637,12 @@ class Enumerator::Chain[out Elem] < Enumerator[Elem, void]
641
637
#
642
638
# If no block is given, returns an enumerator.
643
639
#
644
- def each : () { (Enum ) -> void } -> self
645
- | () -> Enumerator[E , self ]
640
+ def each : () { (Elem ) -> void } -> self
641
+ | () -> Enumerator[Elem , self ]
646
642
647
643
# wrong argument type chain (expected enumerator) (TypeError)
648
644
def with_index : (?Integer) ?{ (?) -> untyped } -> bot
645
+
646
+ # wrong argument type chain (expected enumerator) (TypeError)
649
647
def each_with_index : () ?{ (?) -> untyped } -> bot
650
648
end
You can’t perform that action at this time.
0 commit comments