insns.def: preserve encoding

* insns.def (defineclass): preserve encoding of name in error
  messages when already defined but type mismatch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-06-28 17:06:59 +00:00
parent 3ed6f43b96
commit 491ace2dbe
4 changed files with 17 additions and 2 deletions

View file

@ -2072,6 +2072,11 @@ class TestModule < Test::Unit::TestCase
assert_raise_with_message(TypeError, /is not a module/) {
m.module_eval "module A; end"
}
n = "M\u{1f5ff}"
m.module_eval "#{n} = 42"
assert_raise_with_message(TypeError, "#{n} is not a module") {
m.module_eval "module #{n}; end"
}
end
private