diff options
Diffstat (limited to 'lib/reline.rb')
-rw-r--r-- | lib/reline.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/reline.rb b/lib/reline.rb index 6a5f9b2390..339b8bc8d7 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -200,7 +200,11 @@ module Reline private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination) if ENV['RELINE_STDERR_TTY'] - $stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w') + if Reline::IOGate.win? + $stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a') + else + $stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w') + end $stderr.sync = true $stderr.puts "Reline is used by #{Process.pid}" end |