stdout-rouge-fix.patch 699 B

1234567891011121314151617181920212223242526272829303132
  1. --- a/lib/mkmf.rb 2009-06-10 09:09:22.000000000 +0200
  2. +++ b/lib/mkmf.rb 2011-11-12 02:53:05.862766935 +0100
  3. @@ -168,19 +168,25 @@
  4. module Logging
  5. @log = nil
  6. @logfile = 'mkmf.log'
  7. - @orgerr = $stderr.dup
  8. - @orgout = $stdout.dup
  9. @postpone = 0
  10. def self::open
  11. @log ||= File::open(@logfile, 'w')
  12. @log.sync = true
  13. + orgerr = $stderr.dup
  14. + orgout = $stdout.dup
  15. $stderr.reopen(@log)
  16. $stdout.reopen(@log)
  17. yield
  18. ensure
  19. - $stderr.reopen(@orgerr)
  20. - $stdout.reopen(@orgout)
  21. + if orgerr
  22. + $stderr.reopen(orgerr)
  23. + orgerr.close
  24. + end
  25. + if orgout
  26. + $stdout.reopen(orgout)
  27. + orgout.close
  28. + end
  29. end
  30. def self::message(*s)