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

Add C API rb_enc_interned_str_cstr function #3427

Closed
wants to merge 2 commits into from

Conversation

thomasmarshall
Copy link
Contributor

@thomasmarshall thomasmarshall commented Feb 1, 2024

This adds the rb_enc_interned_str_cstr and rb_str_to_interned_str functions for the C API.

Closes #3408.

Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the 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.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Feb 1, 2024
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
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link

Thank you for signing the OCA.

@oracle-contributor-agreement oracle-contributor-agreement bot added OCA Verified All contributors have signed the Oracle Contributor Agreement. and removed OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. labels Feb 1, 2024
@thomasmarshall thomasmarshall force-pushed the jose-thomas-intern-str branch 4 times, most recently from beb4194 to 4fd5990 Compare February 1, 2024 18:49
@thomasmarshall thomasmarshall marked this pull request as ready for review February 1, 2024 19:38
@andrykonchin andrykonchin added the in-ci The PR is being tested in CI. Do not push new commits. label Feb 2, 2024
@goyox86 goyox86 force-pushed the jose-thomas-intern-str branch from 40c6850 to a8722bd Compare February 8, 2024 16:34
@andrykonchin
Copy link
Member

andrykonchin commented Feb 8, 2024

Because of a forced pushing after in-ci label is added this PR might not be marked as "merged" when the internal PR is merged.

@andrykonchin
Copy link
Member

Merged in 88cbf96. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-ci The PR is being tested in CI. Do not push new commits. OCA Verified All contributors have signed the Oracle Contributor Agreement. shopify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rb_enc_interned_str_cstr isn't implemented
5 participants