mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
silently(): Use ensure.
This commit is contained in:
parent
e9230a00c1
commit
db58d2c8ab
1 changed files with 3 additions and 4 deletions
|
|
@ -3,11 +3,10 @@ require File.expand_path('helper', File.dirname(__FILE__))
|
|||
|
||||
class TestHTTPCookie < Test::Unit::TestCase
|
||||
def silently
|
||||
warn_level = $VERBOSE
|
||||
$VERBOSE = false
|
||||
res = yield
|
||||
warn_level, $VERBOSE = $VERBOSE, false
|
||||
yield
|
||||
ensure
|
||||
$VERBOSE = warn_level
|
||||
res
|
||||
end
|
||||
|
||||
def setup
|
||||
|
|
|
|||
Loading…
Reference in a new issue