mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 23:16:42 +02:00
Ignore failure to set nonblock mode. (#6524)
This commit is contained in:
parent
1a7e7bb2d1
commit
1bafa4a59b
Notes:
git
2022-10-11 06:18:45 +09:00
Merged-By: ioquatix <samuel@codeotaku.com>
2 changed files with 18 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue