diff options
Diffstat (limited to 'test/-ext-/wait/test_wait.rb')
-rw-r--r-- | test/-ext-/wait/test_wait.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/-ext-/wait/test_wait.rb b/test/-ext-/wait/test_wait.rb index 79127c041b..8e53f067cf 100644 --- a/test/-ext-/wait/test_wait.rb +++ b/test/-ext-/wait/test_wait.rb @@ -12,14 +12,18 @@ class TestWait < Test::Unit::TestCase end def test_wait_for_invalid_fd - r, w = IO.pipe - r.close + assert_separately [], <<~'RUBY' + require '-test-/wait' - IO.for_fd(w.fileno).close + r, w = IO.pipe + r.close - assert_raise(Errno::EBADF) do - IO.io_wait(w, IO::WRITABLE, nil) - end + IO.for_fd(w.fileno).close + + assert_raise(Errno::EBADF) do + IO.io_wait(w, IO::WRITABLE, nil) + end + RUBY end def test_wait_for_closed_pipe |