diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-19 07:58:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-19 07:58:09 +0000 |
commit | c7f815eed897a8d78b19e041a569d2667a403f4a (patch) | |
tree | 90af8141d302f84fea9294733db66b5544062254 /test/ruby/test_m17n.rb | |
parent | 41f4317f45021460871bd11c666f438f5517904b (diff) | |
download | ruby-c7f815eed897a8d78b19e041a569d2667a403f4a.tar.gz |
test/ruby: suppress runtime warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r-- | test/ruby/test_m17n.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 3a45f1f028..8e7e4c6f91 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1673,13 +1673,9 @@ class TestM17N < Test::Unit::TestCase def test_inspect_with_default_internal bug11787 = '[ruby-dev:49415] [Bug #11787]' - orig_int = Encoding.default_internal - Encoding.default_internal = ::Encoding::EUC_JP - s = begin - [e("\xB4\xC1\xBB\xFA")].inspect - ensure - Encoding.default_internal = orig_int - end + s = EnvUtil.with_default_internal(::Encoding::EUC_JP) do + [e("\xB4\xC1\xBB\xFA")].inspect + end assert_equal(e("[\"\xB4\xC1\xBB\xFA\"]"), s, bug11787) end end |