diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-25 09:36:40 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-25 09:36:40 +0000 |
| commit | 250096aaafa410ed2476ee2a7e457e8c68653349 (patch) | |
| tree | 61a3c7350ef760daf1eb5922b8fcc7375991bdc1 /test/ruby | |
| parent | cca103de0f2da53beea89b4e926748b8bf598f5d (diff) | |
| download | ruby-250096aaafa410ed2476ee2a7e457e8c68653349.tar.gz ruby-250096aaafa410ed2476ee2a7e457e8c68653349.tar.xz ruby-250096aaafa410ed2476ee2a7e457e8c68653349.zip | |
* io.c (pipe_close): removed.
(pipe_yield): defined.
(rb_io_s_pipe): use pipe_yield.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_io.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 7739535ec..c3fbbd690 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -50,6 +50,19 @@ class TestIO < Test::Unit::TestCase assert(x[1].closed?) end + def test_pipe_block_close + 4.times {|i| + x = nil + IO.pipe {|r, w| + x = [r,w] + r.close if (i&1) == 0 + w.close if (i&2) == 0 + } + assert(x[0].closed?) + assert(x[1].closed?) + } + end + def test_gets_rs # default_rs r, w = IO.pipe |
