-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add C API rb_enc_interned_str_cstr function #3427
Conversation
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
end | ||
|
||
# TODO: This doesn't work in MRI because https://github.com/ruby/ruby/blob/8ba8e979c8b8a71dcc308c392bcead38af5306c7/string.c#L12067-L12069 | ||
it "uses the default encoding when enc is a null pointer" do |
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 happens when you run on MRI? For what it's worth, I think it may just be a documentation issue in CRuby that we can fix.
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.
It's a segmentation fault. We'll remove the null handling for now and investigate fixing or updating the documentation in CRuby.
Thank you for signing the OCA. |
beb4194
to
4fd5990
Compare
4fd5990
to
40c6850
Compare
Co-authored-by: Thomas Marshall <[email protected]>
40c6850
to
a8722bd
Compare
Because of a forced pushing after |
Merged in 88cbf96. Thank you! |
This adds the
rb_enc_interned_str_cstr
andrb_str_to_interned_str
functions for the C API.Closes #3408.