-
Notifications
You must be signed in to change notification settings - Fork 189
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 alias String#dedup to String#-@ for Ruby v3.2 #3042
[Compatibility] Add alias String#dedup to String#-@ for Ruby v3.2 #3042
Conversation
824ddfb
to
5ccda89
Compare
suggestion: Inlining is implemented here: truffleruby/src/main/java/org/truffleruby/parser/BodyTranslator.java Lines 493 to 501 in 2beb695
|
be0e5c4
to
2463891
Compare
Thanks for pointing this out. Added |
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.
Thank you!
After inlining one test case fails:
Right now it fails for |
2463891
to
25dd774
Compare
Thank you, just did that. |
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.
Thank you!
@@ -31,6 +31,7 @@ codepoints | |||
concat | |||
count | |||
crypt | |||
dedup |
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.
FYI we shouldn't modify these files, they should reflect the MRI version we import.
But it's no big deal, let's leave as-is for this PR, it will overridden on 3.2 import.
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.
What is the right way to do this? Without this tests will complain that the method is not exposed?
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.
See https://github.com/oracle/truffleruby/blob/master/spec/truffle/methods_spec.rb, so you'd just use jt tag
to mark as extra method, until the 3.2 import which would then regenerate those files.
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.
Noted, thanks!
Source: #3039
String#dedup has been added as an alias to String#-@. [Feature #18595]