Skip to content

[fix] Add partial_script option to Prism invocation - #995

Merged
reese merged 2 commits into
trunkfrom
reese-shebang
Nov 10, 2026
Merged

reese merged 2 commits into
trunkfrom
reese-shebang

Conversation

@reese

@reese reese commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #916

partial_script prevents Prism from erroring on invalid jumps like next/break/etc., as these may be valid when required from another file or in the context of certain command line flags or shebangs. I think this is fine to just have on by default for all files -- the main/partial script distinction doesn't really matter to rubyfmt, so this just prevents us from rejecting files which could be valid syntax in certain runtime situations.

(h/t to kddnewton for pointing this option out in ruby/prism#4344)

@reese reese mentioned this pull request Nov 9, 2026
@reese
reese requested a review from froydnj November 10, 2026 00:08
@reese
reese merged commit eb5363a into trunk Nov 10, 2026
8 checks passed
@reese
reese deleted the reese-shebang branch November 10, 2026 00:26
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.

Processing Failure: rubyfmt Reports Syntax Error for Valid -n Script

2 participants