diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-20 06:45:22 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-20 06:45:22 +0000 |
commit | 5988c787496e104d3552be02841c416f6006f4b6 (patch) | |
tree | fd5d1b4f17d12ae7a746490b2f537663c38ccd25 /test | |
parent | d38975ac74a13fe1561851e1a193b86ea39a5a6d (diff) |
merge revision(s) 26253:
* io.c (io_fwrite): preserve errno. [ruby-core:27425]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@27913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_pipe.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_pipe.rb b/test/ruby/test_pipe.rb index c3b4d29c0a..0ac921b9c2 100644 --- a/test/ruby/test_pipe.rb +++ b/test/ruby/test_pipe.rb @@ -15,4 +15,18 @@ class TestPipe < Test::Unit::TestCase r.close end end + + def test_write + bug2559 = '[ruby-core:27425]' + a, b = IO.pipe + begin + a.close + assert_raises(Errno::EPIPE, bug2559) do + b.write("hi") + end + ensure + a.close if !a.closed? + b.close if !b.closed? + end + end end |