diff options
author | Samuel Williams <[email protected]> | 2022-10-11 10:18:20 +1300 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-11 10:18:20 +1300 |
commit | 1bafa4a59b296e6ca80e32755fc84b76c3c575e5 (patch) | |
tree | 179f15f64f9eaffd62d0e69d7b667fe8e68145a7 /test/ruby/test_io.rb | |
parent | 1a7e7bb2d1dd507a6fdf883548633bdd14bf6854 (diff) |
Ignore failure to set nonblock mode. (#6524)
Notes
Notes:
Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index f4ebccf9df..0c8beb2f95 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1597,6 +1597,22 @@ class TestIO < Test::Unit::TestCase end end + def test_read_nonblock_file + make_tempfile do |path| + File.open(path, 'r') do |file| + file.read_nonblock(4) + end + end + end + + def test_write_nonblock_file + make_tempfile do |path| + File.open(path, 'w') do |file| + file.write_nonblock("Ruby") + end + end + end + def test_write_nonblock_simple_no_exceptions pipe(proc do |w| w.write_nonblock('1', exception: false) |