From: "Eregon (Benoit Daloze)" Date: 2022-03-29T10:29:03+00:00 Subject: [ruby-core:108103] [Ruby master Feature#18655] Merge `IO#wait_readable` and `IO#wait_writable` into core Issue #18655 has been updated by Eregon (Benoit Daloze). Copying a general comment (https://github.com/ruby/ruby/pull/5694#issuecomment-1081700929) on the PR here: I agree with @ioquatix that it doesn't make sense to make IO#wait_readable and IO#wait_writable core, but IO#wait not, because of their close relation. And similarly it makes no sense to me to IO#leave wait_priority in the gem (that was just badly documented and that can be fixed easily). The 3 IO#wait_* methods should be together and must stay consistent with one another, and also implementation-wise it's super weird if not in the same place. It's a similar argument for IO#wait. The controversial methods in https://bugs.ruby-lang.org/issues/18566#note-16 seem ready? and nread. Those seem fine to leave in the gem (very rarely used, and not so directly related to IO#wait*). ---------------------------------------- Feature #18655: Merge `IO#wait_readable` and `IO#wait_writable` into core https://bugs.ruby-lang.org/issues/18655#change-97067 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal ---------------------------------------- Extracted from [Feature #18566]. The decision was made to consider the methods from `io-wait` and `io-nonblock` one by one. I think `wait_readable` and `wait_writeable` should be fairly non-controversial. They're quite essential to use `IO#read_nonblock` and `IO#write_nonblock` effectively. Proposed patch: https://github.com/ruby/ruby/pull/5694 NB: if we only merge some methods, then `io/wait` must test which methods it needs to define or not. For now I use a `if RUBY_VERSION >= "3.2"` check in `extconf.rb`, but there might be a better approach. -- https://bugs.ruby-lang.org/ Unsubscribe: