ruby-changes:68415
From: Nobuyoshi <ko1@a...>
Date: Wed, 13 Oct 2021 02:24:34 +0900 (JST)
Subject: [ruby-changes:68415] 41db84aa30 (master): [ruby/reline] Skip when unable to set input
https://git.ruby-lang.org/ruby.git/commit/?id=41db84aa30 From 41db84aa304e48f1b5082bb8a7b1536501b50c79 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 13 Oct 2021 02:07:16 +0900 Subject: [ruby/reline] Skip when unable to set input `Reline::Windows` always reads from the console by Windows API using fiddle. https://github.com/ruby/reline/commit/c3bf85f5af --- test/reline/test_reline.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index 3e5ad2f874..dd049ac127 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -280,9 +280,14 @@ class Reline::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_reline.rb#L280 assert_raise(TypeError) do Reline.output = "This is not a file." end + input, to_write = IO.pipe to_read, output = IO.pipe - Reline.input, Reline.output = input, output + unless Reline.__send__(:input=, input) + omit "Setting to input is not effective on #{Reline::IOGate}" + end + Reline.output = output + to_write.write "a\n" result = Reline.readline to_write.close -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/