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

Change `&block` to `&` for yielding method in docs #8394

Merged

Conversation

@j8r
Copy link
Contributor

j8r commented Oct 29, 2019

Since #8117 is merged, anonymous block arguments can be & instead of &block, including in docs.

@j8r j8r force-pushed the j8r:change-&block-&-for-yielding-method-in-docs branch from 0cc8d62 to 0b69a2c Oct 29, 2019
@Blacksmoke16

This comment has been minimized.

Copy link
Contributor

Blacksmoke16 commented Oct 29, 2019

Shouldn't this support both? &block is still a valid thing when you want to capture the block; while & should just be used if its non-capturing.

@straight-shoota

This comment has been minimized.

Copy link
Member

straight-shoota commented Oct 29, 2019

@Blacksmoke16 This only affects methods that yield but don't have a block arg in their signature. Capturing methods always have a block arg, so they're not affected by this change.

@RX14 RX14 merged commit 542c542 into crystal-lang:master Nov 1, 2019
5 of 6 checks passed
5 of 6 checks passed
ci/circleci: test_preview_mt Your tests failed on CircleCI
Details
ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32_std Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@RX14 RX14 added this to the 0.32.0 milestone Nov 1, 2019
@j8r j8r deleted the j8r:change-&block-&-for-yielding-method-in-docs branch Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.