nostdout doesn't need to capture output

This commit is contained in:
Jack Nagel 2014-07-06 15:03:25 -05:00
parent b4fd54ae92
commit 0deedabbaf

View File

@ -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