Skip to content

Stop redefining IO's wait methods in the java extension - #76

Merged
headius merged 1 commit into
ruby:masterfrom
sampokuokkanen:jruby-io-wait-builtin
Sep 10, 2026
Merged

Stop redefining IO's wait methods in the java extension#76
headius merged 1 commit into
ruby:masterfrom
sampokuokkanen:jruby-io-wait-builtin

Conversation

@sampokuokkanen

Copy link
Copy Markdown
Contributor

JRuby has had wait, wait_readable and wait_writable in IO since 10.0, so these copies shadow them. They have not kept up either: JRuby 10.1 takes an events mask and a timeout, or a timeout in any position among mode symbols, while these still only understand (timeout, mode). Requiring io/wait takes those forms away again.

The C extension already did this, Init_wait has been empty since the methods moved into io.c. The library still loads, it just defines nothing.

JRuby has had wait, wait_readable and wait_writable in IO since 10.0, so these
copies shadow them. They have not kept up either: JRuby 10.1 takes an events
mask and a timeout, or a timeout in any position among mode symbols, while
these still only understand (timeout, mode). Requiring io/wait takes those
forms away again.

The C extension already did this, Init_wait has been empty since the methods
moved into io.c. The library still loads, it just defines nothing.

@headius headius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yup, even JRuby 9.4 ships some form of IO#wait so let's follow CRuby and remove these.

@headius
headius merged commit 5e9fbcf into ruby:master Sep 10, 2026
18 checks passed
@headius

headius commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@nobu Ok if I release an update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants