diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-08 06:50:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-08 06:50:05 +0000 |
commit | c45d780b830dba93d67fd49bccafc401b3805bcb (patch) | |
tree | 1b11ae9a5669c3562a4009e142d551e3fc02baa2 /test/mkmf/base.rb | |
parent | 63a164f32ed6c62cd40304837ad8f8a3f93a4296 (diff) | |
download | ruby-c45d780b830dba93d67fd49bccafc401b3805bcb.tar.gz |
test/mkmf/base.rb: hide compiler output
* test/mkmf/base.rb (TestMkmf::Capture#reopen): reopen replaced IO
too, to hide compiler output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf/base.rb')
-rw-r--r-- | test/mkmf/base.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/mkmf/base.rb b/test/mkmf/base.rb index ee32fb0c9b..7df1e8961f 100644 --- a/test/mkmf/base.rb +++ b/test/mkmf/base.rb @@ -15,10 +15,12 @@ class TestMkmf < Test::Unit::TestCase end class Capture + attr_accessor :origin def initialize @buffer = "" @filter = nil @out = true + @origin = nil end def clear @buffer.clear @@ -33,8 +35,10 @@ class TestMkmf < Test::Unit::TestCase initialize_copy(io) when File @out = false + @origin.reopen(io) if @origin when IO @out = true + @origin.reopen(io) if @origin else @out = false end @@ -114,10 +118,10 @@ class TestMkmf < Test::Unit::TestCase def mkmf(*args, &block) @stdout.clear - stdout, $stdout = $stdout, @stdout + stdout, @stdout.origin, $stdout = @stdout.origin, $stdout, @stdout @mkmfobj.instance_eval(*args, &block) ensure - $stdout = stdout + $stdout, @stdout.origin = @stdout.origin, stdout end def config_value(name) |