mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 10:33:58 +02:00
* 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
This commit is contained in:
parent
8397134330
commit
1dec79c324
3 changed files with 27 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue