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 yield
else else
begin begin
require 'stringio' out = $stdout.dup
real_stdout = $stdout $stdout.reopen("/dev/null")
$stdout = StringIO.new
yield yield
ensure ensure
$stdout = real_stdout $stdout.reopen(out)
out.close
end end
end end
end end