-
Notifications
You must be signed in to change notification settings - Fork 185
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
[Compatibility] Add Refinement#refined_class #3094
[Compatibility] Add Refinement#refined_class #3094
Conversation
33e40e6
to
77e1363
Compare
@@ -2584,4 +2584,13 @@ protected Object doClass(RubyClass rubyClass) { | |||
return rubyClass.isSingleton; | |||
} | |||
} | |||
|
|||
@Primitive(name = "refined_class") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Primitive name should reflect in which module/class it's defined, so it should be refinement_refined_class
.
Ideally it'd be a CoreMethod though, for that we need to add RefinementNodes
, which I think makes sense.
We should then move the refinement_import_methods
Primitive there.
16dbda8
to
4ea20cb
Compare
|
||
return clonedRootNode.getCallTarget(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: it makes sense to have moving the class into a separate file committed separately.
4ea20cb
to
e585022
Compare
MRI tests fail with:
|
e585022
to
4a53f81
Compare
I have rebased and pushed that to https://github.com/oracle/truffleruby/tree/feature/PA-3039-Refinement-refined_class |
The MRI test fails transiently:
Because the order is unspecified. |
PullRequest: truffleruby/3865
Merged in ec4bbc5 |
Note: Depends on #3093 (this PR requires the
Module#refinements
method to exist from that PR).Source: #3039
Refinement#refined_class has been added. [Feature #12737]