Skip to content

Fix block return type - #1801

Merged
soutaro merged 2 commits into
ruby:masterfrom
ksss:enum-new
Apr 22, 2024
Merged

soutaro merged 2 commits into
ruby:masterfrom
ksss:enum-new

Conversation

@ksss

@ksss ksss commented Apr 14, 2024

Copy link
Copy Markdown
Collaborator

The return value of the block set by Enumerator#initialize is used as the return value of Enumerator#each, so the return value of the block should be Return.

Enumerator.new { :hello }.each {}
#=> :hello

Comment thread test/stdlib/Enumerator_test.rb Resolved
Co-authored-by: Soutaro Matsumoto <matsumoto@soutaro.com>

@soutaro soutaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro added this to the RBS 3.5 milestone Apr 22, 2024
@soutaro
soutaro added this pull request to the merge queue Apr 22, 2024
Merged via the queue into ruby:master with commit feb8722 Apr 22, 2024
@ksss
ksss deleted the enum-new branch April 23, 2024 00:35
@soutaro soutaro added the Released PRs already included in the released version label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Released PRs already included in the released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants