ruby-changes:62263
From: Nobuyoshi <ko1@a...>
Date: Sat, 18 Jul 2020 19:33:28 +0900 (JST)
Subject: [ruby-changes:62263] 9f60ceec54 (master): Suppress bell during the test
https://git.ruby-lang.org/ruby.git/commit/?id=9f60ceec54 From 9f60ceec54a8c05d198d1722c65c8a29e4c71e35 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 15 Jul 2020 23:41:37 +0900 Subject: Suppress bell during the test diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index db67986..12cac20 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -596,7 +596,14 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L596 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/