Skip to content

Fix crash on empty block parameters || and |; x|#451

Open
sinsoku wants to merge 1 commit intoruby:masterfrom
sinsoku:fix-crash-on-empty-block-params
Open

Fix crash on empty block parameters || and |; x|#451
sinsoku wants to merge 1 commit intoruby:masterfrom
sinsoku:fix-crash-on-empty-block-params

Conversation

@sinsoku
Copy link
Copy Markdown
Collaborator

@sinsoku sinsoku commented May 6, 2026

Prism returns BlockParametersNode with parameters: nil for { || ... }
and { |; x| ... }. CallBaseNode#initialize did not handle this and
raised NoMethodError on params.requireds.

Prism returns BlockParametersNode with `parameters: nil` for `{ || ... }`
and `{ |; x| ... }`. CallBaseNode#initialize did not handle this and
raised NoMethodError on `params.requireds`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant