Skip to content

Commit

Permalink
Merge pull request #601 from ruby/add-each
Browse files Browse the repository at this point in the history
Add #each instance method
  • Loading branch information
soutaro authored Feb 15, 2021
2 parents f1ae3f2 + 3201cf2 commit 6cbc01f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/enumerator.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ end

class Enumerator::Generator[out Elem] < Object
include Enumerable[Elem]

def each: () { (Elem) -> void } -> void
end

class Enumerator::Lazy[out Elem, out Return] < Enumerator[Elem, Return]
Expand All @@ -259,4 +261,6 @@ end

class Enumerator::Chain[out Elem] < Object
include Enumerable[Elem]

def each: () { (Elem) -> void } -> void
end

0 comments on commit 6cbc01f

Please # to comment.