diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-12-15 11:37:01 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 11:37:01 +1300 |
commit | d20bd06a97555a4493458d866590107da6cb21f4 (patch) | |
tree | d3978c04ad009762a548c412b44ba4c12bec17e9 /ext | |
parent | 55f56eb66e9045943c4b61876b67bcd971666788 (diff) |
Remove `require 'io/wait'` where it's no longer necessary. (#6932)
* Remove `require 'io/wait'` as it's part of core now.
* Update ruby specs using version gates.
* Add note about why it's conditional.
Notes
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/lib/socket.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb index 1c091650ff..eecdc7d4b8 100644 --- a/ext/socket/lib/socket.rb +++ b/ext/socket/lib/socket.rb @@ -1,7 +1,11 @@ # frozen_string_literal: true require 'socket.so' -require 'io/wait' unless ::IO.method_defined?(:wait_readable, false) + +unless IO.method_defined?(:wait_writable, false) + # It's only required on older Rubies < v3.2: + require 'io/wait' +end class Addrinfo # creates an Addrinfo object from the arguments. |