diff --git a/core/enumerable.rbs b/core/enumerable.rbs index f255f167e..e433f0ca6 100644 --- a/core/enumerable.rbs +++ b/core/enumerable.rbs @@ -1299,7 +1299,7 @@ module Enumerable[unchecked out Elem] : _Each[Elem] # With no block given, returns an Enumerator. # def reverse_each: () { (Elem arg0) -> untyped } -> void - | () -> ::Enumerator[Elem, void] + | () -> ::Enumerator[Elem] # # Expands `lazy` enumerator to an array. See Enumerable#to_a. # diff --git a/core/enumerator/product.rbs b/core/enumerator/product.rbs index 5f79fb266..b16ece144 100644 --- a/core/enumerator/product.rbs +++ b/core/enumerator/product.rbs @@ -1,5 +1,5 @@ %a{annotate:rdoc:skip} -class Enumerator[unchecked out Elem, out Return] +class Enumerator[unchecked out Elem, out Return = void] # # Enumerator::Product generates a Cartesian product of any number of enumerable # objects. Iterating over the product of enumerable objects is roughly diff --git a/core/integer.rbs b/core/integer.rbs index 5922c979a..14afedf6f 100644 --- a/core/integer.rbs +++ b/core/integer.rbs @@ -1168,10 +1168,10 @@ class Integer < Numeric | (to: Numeric, ?by: Integer) { (Integer) -> void } -> void | (by: Numeric, ?to: Numeric) { (Numeric) -> void } -> void | () -> Enumerator[Integer, bot] - | (Numeric limit, ?Integer step) -> Enumerator[Integer, void] - | (Numeric limit, ?Numeric step) -> Enumerator[Numeric, void] - | (to: Numeric, ?by: Integer) -> Enumerator[Integer, void] - | (by: Numeric, ?to: Numeric) -> Enumerator[Numeric, void] + | (Numeric limit, ?Integer step) -> Enumerator[Integer] + | (Numeric limit, ?Numeric step) -> Enumerator[Numeric] + | (to: Numeric, ?by: Integer) -> Enumerator[Integer] + | (by: Numeric, ?to: Numeric) -> Enumerator[Numeric] # # Pushes the given `object` to the queue. # @@ -1661,7 +1661,7 @@ class Thread::Queue < Object # If `timeout` seconds have passed and no data is available `nil` is returned. # If `timeout` is `0` it returns immediately. # - def pop: (?boolish non_block, ?timeout: _ToF?) -> untyped + def pop: (?boolish non_block, ?timeout: _ToF?) -> Elem? # # Pushes the given `object` to the queue. # - def push: (untyped obj) -> void + def push: (Elem obj) -> void #