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

Revert "[ruby/fileutils] Make verbose output go to stdout instead of stderr"

This reverts commit 7cddb844e6,
because the test of rake 13.0.1 is depending on the previous
behavior.
This commit is contained in:
Nobuyoshi Nakada 2020-06-12 19:00:27 +09:00
parent cc9ca468fe
commit 510df47f5f
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 6 additions and 6 deletions

View file

@ -1612,7 +1612,7 @@ module FileUtils
def fu_output_message(msg) #:nodoc: def fu_output_message(msg) #:nodoc:
output = @fileutils_output if defined?(@fileutils_output) output = @fileutils_output if defined?(@fileutils_output)
output ||= $stdout output ||= $stderr
if defined?(@fileutils_label) if defined?(@fileutils_label)
msg = @fileutils_label + msg msg = @fileutils_label + msg
end end

View file

@ -1722,16 +1722,16 @@ class TestFileUtils < Test::Unit::TestCase
o.extend(FileUtils) o.extend(FileUtils)
o.singleton_class.send(:public, :chdir) o.singleton_class.send(:public, :chdir)
o.freeze o.freeze
orig_stdout = $stdout orig_stderr = $stderr
$stdout = StringIO.new $stderr = StringIO.new
o.chdir('.', verbose: true){} o.chdir('.', verbose: true){}
$stdout.rewind $stderr.rewind
assert_equal(<<-END, $stdout.read) assert_equal(<<-END, $stderr.read)
cd . cd .
cd - cd -
END END
ensure ensure
$stdout = orig_stdout if orig_stdout $stderr = orig_stderr if orig_stderr
end end
def test_getwd def test_getwd