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

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
This commit is contained in:
nobu 2012-05-08 06:50:05 +00:00
parent 63a164f32e
commit c45d780b83

View file

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