aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-17 17:24:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-17 23:55:22 +0900
commit4b7d27ca0de5e1294fa2072d948953ef49753fc5 (patch)
tree4ed5514282e6dd864f12b28c12deaa1465c1acdd
parent1b86309b04709ce0a64a9206ca638eccda9d4fec (diff)
downloadruby-4b7d27ca0de5e1294fa2072d948953ef49753fc5.tar.gz
[ruby/io-console] Use IO.console instead of STDIN
https://github.com/ruby/io-console/commit/9e3ec5b936
-rw-r--r--test/io/console/test_io_console.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 765385df40..083b4a7fb9 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -332,11 +332,12 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
begin;
STDOUT.puts `stty -a`.scan(/\b\w+ *= *\^.;/), ""
STDOUT.flush
- while c = STDIN.getch
+ con = IO.console
+ while c = con.getch
p c.ord
- p STDIN.getch(intr: false).ord
+ p con.getch(intr: false).ord
begin
- p STDIN.getch(intr: true).ord
+ p con.getch(intr: true).ord
rescue Interrupt => e
p e
end