summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-10 01:45:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-10 01:45:09 +0000
commit7ef154f83313316d8096a89057c89090283ec66e (patch)
tree0eb6e69090a2704b7a841938d55027d6587d8a36 /test
parent9fa668f34aa13367a9adc9903de9a8a782cf2910 (diff)
* test/readline/test_readline.rb (test_completion_proc_empty_result): rescue NoMemoryError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/readline/test_readline.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb
index 4ef696f..2b97dc8 100644
--- a/test/readline/test_readline.rb
+++ b/test/readline/test_readline.rb
@@ -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