Skip to content

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

Merged
sinsoku merged 1 commit into
ruby:masterfrom
sinsoku:fix-crash-on-empty-block-params
May 24, 2026
Merged

Fix crash on empty block parameters || and |; x|#451
sinsoku merged 1 commit into
ruby: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`.
@sinsoku sinsoku merged commit 3add219 into ruby:master May 24, 2026
6 checks passed
@sinsoku sinsoku deleted the fix-crash-on-empty-block-params branch May 24, 2026 07:11
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