diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-24 01:56:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-24 01:56:36 +0000 |
commit | 1dec79c324d93b365f699bafa1a65de5752988ea (patch) | |
tree | 9978fb2a75dd991193660e4bf67c5aa6db1fd921 /test/readline | |
parent | 8397134330c388e562a8f7aa255b36dbcd7efecf (diff) |
* ext/readline/readline.c (readline_readline): check if outstream
is closed to get rid of a bug of readline 6. [ruby-dev:45043]
[Bug #5803]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/readline')
-rw-r--r-- | test/readline/test_readline.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index e3a7c5d4ec..0d5efeac01 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -303,6 +303,16 @@ class TestReadline < Test::Unit::TestCase end end + def test_closed_outstream + bug5803 = '[ruby-dev:45043]' + IO.pipe do |r, w| + Readline.input = r + Readline.output = w + (w << "##\t").close + assert_raise(IOError, bug5803) {Readline.readline} + end + end + private def replace_stdio(stdin_path, stdout_path) |