summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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 4ef696f25f..2b97dc8d3e 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