Skip to content

Remove outdated heredoc fixup hack - #992

Open
reese wants to merge 1 commit into
trunkfrom
reese-heredoc-mistake
Open

reese wants to merge 1 commit into
trunkfrom
reese-heredoc-mistake

Conversation

@reese

@reese reese commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

This whole render queue heredoc indentation hack originated several years ago, and in the meantime the heredoc machinery has changed a good bit in such a way that AFAICT obviates this. From my reading of the git history, this originates a pretty long ways back to maybe even before breakables were really used, and the additional indent was used to get heredocs in method calls to render the parens at the right indentation level. The addition of breakables (which handle their own indentation) was why this duplication existed. Regardless, I think the machinery around breakables/call chains/etc. sufficiently handles its own indentation nowadays, so the duplicate indentation is just vestigial and can be removed.

More importantly, it runs on literally every token in the render queue, so every one does another token read + pattern match, which is part of why render_as is currently a huge chunk of the runtime. Cutting this out is just a step towards making the render queue much more efficient.

@reese
reese requested a review from froydnj November 6, 2026 05:21
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