diff options
| -rw-r--r-- | Library/Homebrew/utils.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 8035a21cd..384313ed1 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -249,12 +249,12 @@ def nostdout yield else begin - require 'stringio' - real_stdout = $stdout - $stdout = StringIO.new + out = $stdout.dup + $stdout.reopen("/dev/null") yield ensure - $stdout = real_stdout + $stdout.reopen(out) + out.close end end end |
