From 0deedabbaf5f4a92a3ca4dde009aed8c82eb0498 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 6 Jul 2014 15:03:25 -0500 Subject: [PATCH] nostdout doesn't need to capture output --- Library/Homebrew/utils.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 8035a21cd9..384313ed1a 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