mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/csv/write/test_general.rb: suppress warnings
of "setting Encoding.default_internal".
This commit is contained in:
parent
c01df7e58f
commit
375cf12918
1 changed files with 4 additions and 0 deletions
|
@ -225,10 +225,14 @@ module TestCSVWriteGeneral
|
|||
def with_default_internal(encoding)
|
||||
original = Encoding.default_internal
|
||||
begin
|
||||
$VERBOSE, verbose_bak = nil, $VERBOSE
|
||||
Encoding.default_internal = encoding
|
||||
$VERBOSE = verbose_bak
|
||||
yield
|
||||
ensure
|
||||
$VERBOSE, verbose_bak = nil, $VERBOSE
|
||||
Encoding.default_internal = original
|
||||
$VERBOSE = verbose_bak
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue