mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
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:
parent
3ed6f43b96
commit
491ace2dbe
4 changed files with 17 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue