Conversation
eregon
force-pushed
the
find-source_range
branch
from
September 23, 2026 22:01
f8cae8e to
b7e2474
Compare
* This is more accurate than using the line and is a portable API between Ruby implementations. * This also works in --parser=parse.y mode. * I also tried to use #syntax_tree but that fails 2 tests as it returns the CallNode instead of BlockNode for blocks. Additionally, #syntax_tree emits many warnings when running the test suite: syntax_tree: a prism gem other than the default gem is loaded; the result may not correspond exactly to the compiled code
eregon
force-pushed
the
find-source_range
branch
from
September 23, 2026 22:16
b7e2474 to
20ff961
Compare
Collaborator
|
What is the use-case of Also, we really should get rid of that warning |
Collaborator
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
syntax_tree: a prism gem other than the default gem is loaded; the result may not correspond exactly to the compiled codeI have tested locally and this works fine on TruffleRuby 40 which implements
source_range.Fixes #4066