aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 15:03:25 -0500
committerJack Nagel2014-07-06 15:03:42 -0500
commit815ab1a7dbfc9bd7c7546ea79cc13c76c6d1cb65 (patch)
tree5cd6f1de1993c1d7de71897b1057f06766bc4873 /Library/Homebrew/utils.rb
parentc66c8691f8666395fdb836112af63bae1151022e (diff)
downloadhomebrew-815ab1a7dbfc9bd7c7546ea79cc13c76c6d1cb65.tar.bz2
nostdout doesn't need to capture output
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb8
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