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

Implement rb_syserr_new in C #3175

Closed
wants to merge 2 commits into from

Conversation

rwstauner
Copy link
Collaborator

@rwstauner rwstauner commented Jul 24, 2023

  • Add a spec for c function rb_syserr_new_str
  • Implement rb_syserr_new c function

It's already defined in cext.rb and internal/error.h it just isn't exposed in C.

I found an instance of it in bootsnap: https://github.com/Shopify/bootsnap/blob/a3157d8f5be9ab575d38e3e56842464f4c7298f4/ext/bootsnap/bootsnap.c#L789

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 24, 2023
Copy link
Collaborator

@nirvdrum nirvdrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. Thanks!

@rwstauner rwstauner force-pushed the rwstauner/rb_syserr_new branch 2 times, most recently from db15a90 to 9957296 Compare July 26, 2023 22:37
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good, needs a bit of polishing.

spec/ruby/optional/capi/exception_spec.rb Outdated Show resolved Hide resolved
spec/ruby/optional/capi/exception_spec.rb Outdated Show resolved Hide resolved
spec/ruby/optional/capi/exception_spec.rb Show resolved Hide resolved
@eregon eregon self-assigned this Jul 28, 2023
@eregon eregon assigned andrykonchin and unassigned eregon Aug 1, 2023
@andrykonchin andrykonchin added the in-ci The PR is being tested in CI. Do not push new commits. label Aug 1, 2023
@andrykonchin
Copy link
Member

Merged in 222dcf3

@rwstauner rwstauner deleted the rwstauner/rb_syserr_new branch February 1, 2024 15:04
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.

4 participants