Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Proc#source_location #1175

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Aug 28, 2023

I had this one in a local branch for a while, but it needed the changes of ruby/spec#1060 before we could really merge them

The line numbers are often a few lines off, but that is simply because it gets the wrong information from Env. These FIXMEs should probably be changed somewhere in the compiler itself.
Even if the line numbers are a bit off, it's still a really useful tool to debug some things.

Before anyone gets the idea of simply copy-pasting this code to Method#source_location: this one does not get any line information, so it would just return nil.

It uses the data from the Env object. The issues within the NATFIXME
blocks are actually issues of Env, not of this method.
@seven1m seven1m merged commit b242dd6 into natalie-lang:master Aug 29, 2023
10 checks passed
@herwinw herwinw deleted the proc_source_location branch August 29, 2023 03:47
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