Skip to content

Preserve heredoc body when translating multi-line T.let assertions#943

Open
styrmis wants to merge 1 commit into
mainfrom
06-08-fix-spoom-heredoc-handling
Open

Preserve heredoc body when translating multi-line T.let assertions#943
styrmis wants to merge 1 commit into
mainfrom
06-08-fix-spoom-heredoc-handling

Conversation

@styrmis

@styrmis styrmis commented Jun 8, 2026

Copy link
Copy Markdown

When T.let(...) spans multiple lines and wraps a heredoc, the replacement range covers the entire call including the heredoc body. Since the value node's source range only covers the opener line (e.g. <<~MSG.strip), the body and terminator were silently dropped, producing syntactically broken Ruby.

@styrmis styrmis force-pushed the 06-08-fix-spoom-heredoc-handling branch 3 times, most recently from 3bd034d to 3c92653 Compare June 8, 2026 11:30
When `T.let(...)` spans multiple lines and wraps a heredoc, the
replacement range covers the entire call including the heredoc body.
Since the value node's source range only covers the opener line
(e.g. `<<~MSG.strip`), the body and terminator were silently dropped,
producing syntactically broken Ruby.
@styrmis styrmis force-pushed the 06-08-fix-spoom-heredoc-handling branch from 3c92653 to a5d6263 Compare June 8, 2026 11:46
@styrmis styrmis marked this pull request as ready for review June 8, 2026 12:00
@styrmis styrmis requested a review from a team as a code owner June 8, 2026 12:00
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