Merged
Conversation
This will fix top-level error for class variables as reported in jruby#7656. There is now an issue that ```eval("@@A = 1")``` will not raise. This is a much more minor issue. I will take some more time to try and come up with a more encompassing fix but even if I don't this is a good trade.
Examination of scopes seems to be enough to pass things.
So much logic mangling around evalType such that I just assign it as field to IRBuilder. Once I did that I then realized a plain eval without a binding still comes in as a binding eval (which is somewhat true since it makes a default binding at that callsite). This binding property is problemative as a binding is a live value. The solution is to just not enforce this error if you pass in an explicit binding. The error itself is of questionable value and doing a cvar action in an eval with a top-level binding just seems like uncommon on uncommon. This could get fixed since the live binding has info we can examine but we do not say topself in runtime structures directly (e.g. cref will be Object, self will not be either???). Does not feel worth it.
We need to make sure if eval is happening within a module/class scope we do not consider it top self eval.
all subtypes of core types now return their base types.
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.
This will fix top-level error for class variables as reported in #7656. There is now an issue that
eval("@@a = 1")will not raise. This is a much more minor issue. I will take some more time to try and come up with a more encompassing fix but even if I don't this is a good trade.