Skip to content

Conversation

@eregon
Copy link
Member

@eregon eregon commented Jan 18, 2026

Extracted from #3808

I need Prism::Source#line_to_byte_offset for Ripper, and it's needed to optimize Prism::Node#tunnel.

* By comparing byte offsets which folds 3 branches into 1.
* Also avoids allocation of Location objects.
@eregon
Copy link
Member Author

eregon commented Jan 19, 2026

@Earlopain Could you review this?
I'd rather have this merged soon than working on branches on top of this one for Ripper stuff.

Copy link
Collaborator

@Earlopain Earlopain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, it was basically already approved in the original PR.

@Earlopain Earlopain merged commit 8a43af1 into ruby:main Jan 19, 2026
66 checks passed
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.

2 participants