1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress bell during the test

This commit is contained in:
Nobuyoshi Nakada 2020-07-15 23:41:37 +09:00
parent 6f5f15f1e4
commit 9f60ceec54
Notes: git 2020-07-18 19:33:36 +09:00

View file

@ -596,7 +596,14 @@ module BasetestReadline
end
w.write("a\t\n")
w.flush
line = Readline.readline('> ', false)
begin
stderr = $stderr.dup
$stderr.reopen(null)
line = Readline.readline('> ', false)
ensure
$stderr.reopen(stderr)
stderr.close
end
end
end