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