aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index dca78603c7..fab142a5ee 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1230,6 +1230,14 @@ class TestIO < Test::Unit::TestCase
t.value
assert_equal("", s)
end
+ with_pipe do |r, w|
+ s = "xxx"
+ t = Thread.new {r.read(2, s)}
+ Thread.pass until t.stop?
+ t.kill
+ t.value
+ assert_equal("xxx", s)
+ end
end
def test_write_nonblock