зеркало из https://github.com/github/ruby.git
Suppress warnings: setting Encoding.default_external
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
edacc7d236
Коммит
caa0e40f4d
|
@ -195,6 +195,8 @@ class TestM17N < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_string_inspect_encoding
|
||||
EnvUtil.suppress_warning do
|
||||
begin
|
||||
orig_int = Encoding.default_internal
|
||||
orig_ext = Encoding.default_external
|
||||
Encoding.default_internal = nil
|
||||
|
@ -221,6 +223,8 @@ class TestM17N < Test::Unit::TestCase
|
|||
Encoding.default_internal = orig_int
|
||||
Encoding.default_external = orig_ext
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_utf_16_32_inspect
|
||||
str = "\u3042"
|
||||
|
@ -247,6 +251,8 @@ class TestM17N < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_object_utf16_32_inspect
|
||||
EnvUtil.suppress_warning do
|
||||
begin
|
||||
orig_int = Encoding.default_internal
|
||||
orig_ext = Encoding.default_external
|
||||
Encoding.default_internal = nil
|
||||
|
@ -260,6 +266,8 @@ class TestM17N < Test::Unit::TestCase
|
|||
Encoding.default_internal = orig_int
|
||||
Encoding.default_external = orig_ext
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_object_inspect_external
|
||||
orig_v, $VERBOSE = $VERBOSE, false
|
||||
|
|
Загрузка…
Ссылка в новой задаче