From 815ab1a7dbfc9bd7c7546ea79cc13c76c6d1cb65 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 6 Jul 2014 15:03:25 -0500 Subject: nostdout doesn't need to capture output --- Library/Homebrew/utils.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3