summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-03 14:08:18 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-03 14:08:18 +0000
commit5be2e8eb3954a769a5e639da5e92572116e840bc (patch)
treead5f668640404e96a1f24d6d6a80e29a95512280 /lib
parent83466682e292cf7f0faeacd945f37829707b80a6 (diff)
merge revision(s) 40080,40081: [Backport #8209]
* ext/extmk.rb (extmake): Use Logging.open to switch stdout and stderr. Delay Logging::log_close until the failure message is written. Write the failure message only if log file is opened. * lib/mkmf.rb (Logging.log_opened?): New method. [ruby-dev:47215] [Bug #8209] * ext/extmk.rb (extmake): Invoke Logging::log_close in a ensure clause. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@42359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 03ff262d25..7653cc6a43 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -299,6 +299,10 @@ module MakeMakefile
@log.sync = true
end
+ def self::log_opened?
+ @log and not @log.closed?
+ end
+
def self::open
log_open
$stderr.reopen(@log)