Created
January 22, 2010 15:44
-
-
Save djberg96/283859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# It would be nice if I could temporarily redirect stdout and stderr. | |
require 'mkmf' | |
# stdout redirected within block only | |
$stdout.reopen('/dev/null') do | |
if have_header('foo.h') | |
# Do stuff | |
end | |
end | |
# stdout now back to its former setting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment