From ba117980fb5655a20e44122de9742dab7475b5e2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 11 Aug 2026 20:19:46 +0900 Subject: [PATCH 1/3] Define "rdoc:coverage" task for old RDoc --- Rakefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Rakefile b/Rakefile index 169d954..db9dd5c 100644 --- a/Rakefile +++ b/Rakefile @@ -48,6 +48,9 @@ task "build" => %w[rdoc:coverage build:java] task "build:java" => "date_epoch" +# For old the RDoc included with Ruby 2.6, which doesn't define this task. +task "rdoc:coverage" + # Keep RDoc::Task's coverage check from exiting the Rake process. coverage_task = Rake::Task["rdoc:coverage"].actions.shift task "rdoc:coverage" do |*t| From 60215ae0376eaa230a3cd8ee28faa97520017a02 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 11 Aug 2026 20:20:39 +0900 Subject: [PATCH 2/3] Define the backend specific test only for the backend --- test/io/console/test_io_console.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 173e6a2..aff1d54 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -309,8 +309,6 @@ def test_console_mode end def test_stty_redirect_stdout - omit unless IO.private_method_defined?(:_io_console_stty) - helper do |_, s| stdout = STDOUT.dup begin @@ -322,7 +320,7 @@ def test_stty_redirect_stdout end assert_not_empty(mode) end - end + end if IO.private_method_defined?(:_io_console_stty) def test_tty_on_pty pend "not supported" unless TTY_ENHANCED From 664fbc6719231271c6ee6749551646095d5a10d5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 11 Aug 2026 20:22:51 +0900 Subject: [PATCH 3/3] Avoid timing race in `noecho` test Read the input before restoring echo mode so slow platforms do not process it after echo has been re-enabled. --- test/io/console/test_io_console.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index aff1d54..48743fc 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -211,7 +211,8 @@ def test_noecho s.noecho { assert_not_send([s, :echo?]) m.print "a" - sleep 0.1 + m.flush + assert_equal("a", s.getch) } m.print "b" assert_equal("b", m.readpartial(10))