summaryrefslogtreecommitdiff
path: root/test/io
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2022-12-15 11:37:01 +1300
committerGitHub <noreply@github.com>2022-12-15 11:37:01 +1300
commitd20bd06a97555a4493458d866590107da6cb21f4 (patch)
treed3978c04ad009762a548c412b44ba4c12bec17e9 /test/io
parent55f56eb66e9045943c4b61876b67bcd971666788 (diff)
downloadruby-d20bd06a97555a4493458d866590107da6cb21f4.tar.gz
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.
Diffstat (limited to 'test/io')
-rw-r--r--test/io/wait/test_io_wait.rb7
-rw-r--r--test/io/wait/test_io_wait_uncommon.rb1
-rw-r--r--test/io/wait/test_ractor.rb1
3 files changed, 3 insertions, 6 deletions
diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb
index 8a2b6c2d12..7997a4814f 100644
--- a/test/io/wait/test_io_wait.rb
+++ b/test/io/wait/test_io_wait.rb
@@ -3,10 +3,9 @@
require 'test/unit'
require 'timeout'
require 'socket'
-begin
- require 'io/wait'
-rescue LoadError
-end
+
+# For `IO#ready?` and `IO#nread`:
+require 'io/wait'
class TestIOWait < Test::Unit::TestCase
diff --git a/test/io/wait/test_io_wait_uncommon.rb b/test/io/wait/test_io_wait_uncommon.rb
index 7b92e4c758..0f922f4e24 100644
--- a/test/io/wait/test_io_wait_uncommon.rb
+++ b/test/io/wait/test_io_wait_uncommon.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
require 'test/unit'
-require 'io/wait'
# test uncommon device types to check portability problems
# We may optimize IO#wait_*able for non-Linux kernels in the future
diff --git a/test/io/wait/test_ractor.rb b/test/io/wait/test_ractor.rb
index 3742680cf7..800216e610 100644
--- a/test/io/wait/test_ractor.rb
+++ b/test/io/wait/test_ractor.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require 'test/unit'
require 'rbconfig'
-require 'io/wait'
class TestIOWaitInRactor < Test::Unit::TestCase
def test_ractor