aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 17:06:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 17:06:59 +0000
commit491ace2dbebcba5e6f36b9e877c585823fd583f1 (patch)
tree4aa082d64367ae2005f212fcc10bf3cb3843ba2c /test/ruby/test_class.rb
parent3ed6f43b96de41f57edbb4c935f58342b12996f5 (diff)
downloadruby-491ace2dbebcba5e6f36b9e877c585823fd583f1.tar.gz
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
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index efee102835..4f7e037580 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -529,5 +529,10 @@ class TestClass < Test::Unit::TestCase
assert_raise_with_message(TypeError, /is not a class/) {
m.module_eval "class A; end"
}
+ n = "M\u{1f5ff}"
+ m.module_eval "#{n} = 42"
+ assert_raise_with_message(TypeError, "#{n} is not a class") {
+ m.module_eval "class #{n}; end"
+ }
end
end