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
commitb8f6031a6840265b2ee0fdf85bbcec95ae5fa5dd (patch)
tree4aa082d64367ae2005f212fcc10bf3cb3843ba2c /test/ruby/test_class.rb
parentb07e0a33b4f7c0ca2da35ad238e9ef22f77a7108 (diff)
downloadruby-b8f6031a6840265b2ee0fdf85bbcec95ae5fa5dd.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