diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-12-17 17:24:21 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-12-17 23:55:22 +0900 |
commit | 4b7d27ca0de5e1294fa2072d948953ef49753fc5 (patch) | |
tree | 4ed5514282e6dd864f12b28c12deaa1465c1acdd /test/io/console/test_io_console.rb | |
parent | 1b86309b04709ce0a64a9206ca638eccda9d4fec (diff) |
[ruby/io-console] Use IO.console instead of STDIN
https://github.com/ruby/io-console/commit/9e3ec5b936
Diffstat (limited to 'test/io/console/test_io_console.rb')
-rw-r--r-- | test/io/console/test_io_console.rb | 7 |
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 |