ruby-changes:59551
From: Nobuyoshi <ko1@a...>
Date: Sun, 29 Dec 2019 16:56:38 +0900 (JST)
Subject: [ruby-changes:59551] 31e2f03512 (master): [ruby/io-console] Enable only interrupt bits on `intr: true`
https://git.ruby-lang.org/ruby.git/commit/?id=31e2f03512 From 31e2f035121a4c07d6ea3b5eab69bc97749a022b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 29 Dec 2019 16:12:19 +0900 Subject: [ruby/io-console] Enable only interrupt bits on `intr: true` https://github.com/ruby/io-console/commit/baaf929041 diff --git a/ext/io/console/console.c b/ext/io/console/console.c index ac5b6a6..3a6bb25 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -188,7 +188,7 @@ set_rawmode(conmode *t, void *arg) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L188 #endif #ifdef ISIG if (r->intr) { - t->c_iflag |= BRKINT|IXON; + t->c_iflag |= BRKINT; t->c_lflag |= ISIG; } #endif diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index d71e426..77c6dac 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -364,6 +364,11 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L364 assert_ctrl("#{cc.ord}", cc, r, w) assert_ctrl("#{cc.ord}", cc, r, w) end + if cc = ctrl["stop"] + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/