Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created January 22, 2010 15:44
Show Gist options
  • Save djberg96/283859 to your computer and use it in GitHub Desktop.
Save djberg96/283859 to your computer and use it in GitHub Desktop.
# 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