-
Notifications
You must be signed in to change notification settings - Fork 186
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 changes of ruby-3.0 to IO#wait #2953
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IO#wait used to be a alias to wait_readable years ago, but the interface changed a lot. Also update the related tests from MRI.
oracle-contributor-agreement
bot
added
the
OCA Verified
All contributors have signed the Oracle Contributor Agreement.
label
Mar 20, 2023
eregon
reviewed
Mar 20, 2023
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 for the PR! I'll review it in more details soon.
eregon
approved these changes
Mar 21, 2023
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, this looks great. I just pushed small cleanups.
graalvmbot
pushed a commit
that referenced
this pull request
Mar 31, 2023
PullRequest: truffleruby/3724
graalvmbot
pushed a commit
that referenced
this pull request
Apr 6, 2023
PullRequest: truffleruby/3724 (cherry picked from commit 365a678)
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ruby-3.0 got a lot of IO changes; one of them was that IO#wait was changed to support IO event mask like the Fiber.scheduler is using. This is what pg-1.4.x.gem makes use of.
PG tests for
IO::READABLE
andIO::READABLE
to be defined and expects the newIO#wait
API to be available in that case. See https://github.com/ged/ruby-pg/blob/43f3ea0b50040683080392a2802bca0d74504922/lib/pg/connection.rb#L596Now that truffleruby master branch defines these constants the connection setup fails with
wrong number of arguments (given 2, expected 0..1)
, due to the alias towait_readable
.I implemented the method based on the C code of MRI: https://github.com/ruby/ruby/blob/758e4db551e7e80a65b610cc73fcb61e74ec5a0c/io.c#L9749