1234567891011121314151617181920212223242526272829303132333435 |
- diff --git a/lib/mkmf.rb b/lib/mkmf.rb
- index c9e738a..7a8004d 100644
- --- a/lib/mkmf.rb
- +++ b/lib/mkmf.rb
- @@ -201,20 +201,26 @@ end
- module Logging
- @log = nil
- @logfile = 'mkmf.log'
- - @orgerr = $stderr.dup
- - @orgout = $stdout.dup
- @postpone = 0
- @quiet = $extmk
-
- def self::open
- @log ||= File::open(@logfile, 'w')
- @log.sync = true
- + orgerr = $stderr.dup
- + orgout = $stdout.dup
- $stderr.reopen(@log)
- $stdout.reopen(@log)
- yield
- ensure
- - $stderr.reopen(@orgerr)
- - $stdout.reopen(@orgout)
- + if orgerr
- + $stderr.reopen(orgerr)
- + orgerr.close
- + end
- + if orgout
- + $stdout.reopen(orgout)
- + orgout.close
- + end
- end
-
- def self::message(*s)
|