diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-02-05 18:18:48 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-06-13 12:17:04 +0900 |
commit | d9ccb6b372f830fe4aab89460bb4b6147cfd924f (patch) | |
tree | 19f0e271c9e0be55bf65fc3b9c45ec48c0b6f2d1 /lib/reline.rb | |
parent | abc828bc67ff42ddb42f5bd034cec185d6b8821d (diff) | |
download | ruby-d9ccb6b372f830fe4aab89460bb4b6147cfd924f.tar.gz |
[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
Diffstat (limited to 'lib/reline.rb')
-rw-r--r-- | lib/reline.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 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 |