Skip to content

Document that yield isn't allowed in a captured block argument #860

@andrykonchin

Description

@andrykonchin

Both "Capturing blocks" and "Block forwarding" sections mention that break and next keywords are prohibited. But AFAIK yield isn't allowed too. As well as return. It might be important because they are allowed in Ruby.

If this change is welcome, I would like to open a pull request.

https://crystal-lang.org/reference/1.18/syntax_and_semantics/capturing_blocks.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions