diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-08 09:51:23 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-08 09:51:23 +0000 |
| commit | c1d3b01b7a509513e135a6650db24055f112548e (patch) | |
| tree | b89dff1283d9f48db7e0131f82bb65e2af1f5513 /test/ruby | |
| parent | ddc1791462adba31acf414971321c172b0104542 (diff) | |
* io.c (io_fwrite): preserve errno. [ruby-core:27425]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 |
