nostdout doesn't need to capture output
This commit is contained in:
parent
b4fd54ae92
commit
0deedabbaf
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user