ruby-changes:72148
From: Nobuyoshi <ko1@a...>
Date: Mon, 13 Jun 2022 12:17:20 +0900 (JST)
Subject: [ruby-changes:72148] d9ccb6b372 (master): [ruby/reline] Check the ambiguous char width only on tty
https://git.ruby-lang.org/ruby.git/commit/?id=d9ccb6b372 From d9ccb6b372f830fe4aab89460bb4b6147cfd924f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 5 Feb 2022 18:18:48 +0900 Subject: [ruby/reline] Check the ambiguous char width only on tty It sent the char to check even to non-tty, e.g., pipe. This causes `unknown command: "\xE2\x96\xBDstart ` warnings on ruby's parallel test on Windows, where non-standard FDs cannot be passed to child processes. https://github.com/ruby/reline/commit/0d373647fb --- lib/reline.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline.rb b/lib/reline.rb index a9fc49b416..a57b570544 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -466,7 +466,7 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L466 end private def may_req_ambiguous_char_width - @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File) + @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or !STDOUT.tty? return if defined? @ambiguous_width Reline::IOGate.move_cursor_column(0) begin -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/