1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Make a log file on windows if debug env is set

https://github.com/ruby/reline/commit/dff30a2d44
This commit is contained in:
aycabta 2020-12-16 16:28:51 +09:00
parent 2b8fa78176
commit 0158ba7e51

View file

@ -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