diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-06-12 19:00:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-06-12 19:02:50 +0900 |
commit | 510df47f5f7f83918d3aa00316c8a5b959d80d7c (patch) | |
tree | 20c9369cd22a384a99aeaa132fc3c4162bd1d277 | |
parent | cc9ca468fecd153596c25877006f208161e477fb (diff) | |
download | ruby-510df47f5f7f83918d3aa00316c8a5b959d80d7c.tar.gz |
Revert "[ruby/fileutils] Make verbose output go to stdout instead of stderr"
This reverts commit 7cddb844e6d51f954c6669341b9cc656bd7d3492,
because the test of rake 13.0.1 is depending on the previous
behavior.
-rw-r--r-- | lib/fileutils.rb | 2 | ||||
-rw-r--r-- | test/fileutils/test_fileutils.rb | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index fea954e22c..438f3210f7 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1612,7 +1612,7 @@ module FileUtils def fu_output_message(msg) #:nodoc: output = @fileutils_output if defined?(@fileutils_output) - output ||= $stdout + output ||= $stderr if defined?(@fileutils_label) msg = @fileutils_label + msg end diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index d785de406a..f99d5f62c2 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -1722,16 +1722,16 @@ class TestFileUtils < Test::Unit::TestCase o.extend(FileUtils) o.singleton_class.send(:public, :chdir) o.freeze - orig_stdout = $stdout - $stdout = StringIO.new + orig_stderr = $stderr + $stderr = StringIO.new o.chdir('.', verbose: true){} - $stdout.rewind - assert_equal(<<-END, $stdout.read) + $stderr.rewind + assert_equal(<<-END, $stderr.read) cd . cd - END ensure - $stdout = orig_stdout if orig_stdout + $stderr = orig_stderr if orig_stderr end def test_getwd |