Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor block type restriction underscore output to nil #10938

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

straight-shoota
Copy link
Member

This patch replaces underscore output types in block restrictions with nil (empty) for methods where the result of the yielded block is irrelevant and unused. Underscore should be used where the result type is not specified but the value is actually used.

See #10931

This had previously been a part of #10929

@beta-ziliani
Copy link
Member

I wonder if it would break things to explicit the Nil return type when that's the intention (e.g., each)

@straight-shoota
Copy link
Member Author

Nil and empty should be semantically equivalent here. We could use Nil, it's just more characters.

@beta-ziliani
Copy link
Member

right, but given that the semantics are somewhat not entirely there, maybe it makes sense to be explicit for once

@straight-shoota straight-shoota marked this pull request as draft July 14, 2021 09:08
@straight-shoota
Copy link
Member Author

Let's discuss the intended semantics in #10931

I just opened this PR to not loose the these parts of #10929. It should have been a draft from the beginning, to wait for a definitive decision in #10931.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants