utils: fix capture_stderr style

This commit is contained in:
Alyssa Ross 2016-11-14 12:28:45 +00:00
parent 3c310b2e3d
commit 14099ffaf3

View File

@ -377,7 +377,8 @@ ensure
end end
def capture_stderr def capture_stderr
old, $stderr = $stderr, StringIO.new old = $stderr
$stderr = StringIO.new
yield yield
$stderr.string $stderr.string
ensure ensure