Conversation
|
I noticed this gem specifies a minimum Ruby of 2.7, at which time io-wait was still in core. It was moved out to a default gem (still in stdlib) for 3.0 and 3.1, and then moved back into core for 3.2. the gem itself has had an empty extension for some time. |
|
For 2.7, 3.0, and 3.1, the require is still necessary to load the library. If you would like I can guard this require with a version check, if those versions are still considered to be supported. |
io/wait functionality has been in core Ruby since 3.2. It was a default gem in 3.0 and 3.1 and before that it was a non-gem standard library. With the "1.0.0" release of io-wait it is now deprecated and warns when loaded. This patch modifies the require to only run under Ruby versions earlier than 3.2. See ruby/io-wait#79 and ruby/io-wait#80
|
I modified the commit to continue requiring io/wait on Ruby versions earlier than 3.2. |
|
Actually socket.rb seems to require it on Rubies below 3.2: https://github.com/ruby/ruby/blob/0a3704f218f0aec7f92f3a46a2293175b0a7d2b3/ext/socket/lib/socket.rb#L4 So might not even need the |
|
I believe it's possible to run drb over non-socket IO channels, so the require would need to remain for that use case. I am not an expert on drb though. In general I'd say it's better if everyone that depends on the library's features explicitly require that library, even if it becomes redundant across libraries. |
io/wait functionality has been in core Ruby since 3.2 and prior to that was a default gem. With the "1.0.0" release of io-wait it is now deprecated and warns when loaded. This patch removes the last reference to the io/wait library to avoid deprecation warnings.
See ruby/io-wait#79 and ruby/io-wait#80