diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-04 10:02:06 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-04 10:02:06 +0000 |
commit | c06da4735da0e2285c1e3e52202b7090b3f43b1b (patch) | |
tree | 9620b63cc51f9262752534746d42bd2d55af4f32 /test/-ext- | |
parent | 2a989121db8f80aceeadb5d403af79d4b30e1bb8 (diff) | |
download | ruby-c06da4735da0e2285c1e3e52202b7090b3f43b1b.tar.gz |
* thread.c (rb_wait_for_single_fd): Fix wrong return value.
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
(TestWaitForSingleFD#test_wait_for_closed_pipe): test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb b/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb index 76ef68002a..c7dd0909f0 100644 --- a/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb +++ b/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb @@ -29,4 +29,14 @@ class TestWaitForSingleFD < Test::Unit::TestCase end end end + + def test_wait_for_closed_pipe + with_pipe do |r,w| + w.close + rc = IO.wait_for_single_fd(r.fileno, RB_WAITFD_IN, nil) + assert_equal RB_WAITFD_IN, rc + end + end + + end |