1
0
Fork 0
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:
Yusuke Endoh 2019-10-15 23:29:49 +09:00
parent c01df7e58f
commit 375cf12918

View file

@ -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