summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-08 01:55:01 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-08 01:55:01 +0000
commit381821deea75d11a496401256c0267f2ff53183e (patch)
tree21db2da0caf23c2b92c3477b89d6cfbf361e2997 /test
parent4051fadb54cd1c00bc0170b753cd78351d5f9eb2 (diff)
merge revision(s) 34116:
* 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/branches/ruby_1_9_3@34478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/readline/test_readline.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb
index a504fa5e2f..b2e67ec1b1 100644
--- a/test/readline/test_readline.rb
+++ b/test/readline/test_readline.rb
@@ -283,6 +283,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)