зеркало из https://github.com/github/ruby.git
test_module.rb: fix encoding
* test/ruby/test_module.rb (test_const_set_invalid_name): warning message encoding depends on Encoding.default_internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9763fb84b5
Коммит
b3eaacdefc
|
@ -686,7 +686,9 @@ class TestModule < Test::Unit::TestCase
|
|||
assert_raise(NameError) { c1.const_set("X\u{3042}".encode("utf-32be"), :foo) }
|
||||
assert_raise(NameError) { c1.const_set("X\u{3042}".encode("utf-32le"), :foo) }
|
||||
cx = EnvUtil.labeled_class("X\u{3042}")
|
||||
assert_raise_with_message(TypeError, /X\u{3042}/) { c1.const_set(cx, :foo) }
|
||||
EnvUtil.with_default_internal(Encoding::UTF_8) {
|
||||
assert_raise_with_message(TypeError, /X\u{3042}/) { c1.const_set(cx, :foo) }
|
||||
}
|
||||
end
|
||||
|
||||
def test_const_get_invalid_name
|
||||
|
|
Загрузка…
Ссылка в новой задаче