merge revision(s) 34255: [Backport #6035]

* test/readline/test_readline.rb (test_completion_proc_empty_result): rescue NoMemoryError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-02-17 03:25:38 +00:00
parent 54209dd172
commit c1303fbe8a
2 changed files with 4 additions and 4 deletions

View file

@ -207,10 +207,10 @@ class TestReadline < Test::Unit::TestCase
with_temp_stdio do |stdin, stdout|
stdin.write("first\t")
stdin.flush
actual_text = nil
Readline.completion_proc = ->(text) {[]}
line = replace_stdio(stdin.path, stdout.path) {
Readline.readline("> ")
line = nil
replace_stdio(stdin.path, stdout.path) {
assert_nothing_raised(NoMemoryError) {line = Readline.readline("> ")}
}
assert_equal("first", line)
end