summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 17:10:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 17:10:00 +0000
commitb90a5f9334a84b46a49b0966ecd250c2e52a8312 (patch)
treea5ad9510c94450dbdb7f09d9f48c66835a8755fc /test
parent491ace2dbebcba5e6f36b9e877c585823fd583f1 (diff)
insns.def: preserve encoding
* insns.def (defineclass): preserve encoding of name in error messages for non-class super. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_class.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 4f7e037580..27558e33dd 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -359,6 +359,16 @@ class TestClass < Test::Unit::TestCase
end
end;
end
+
+ m = Module.new
+ n = "M\u{1f5ff}"
+ c = m.module_eval "class #{n}; new; end"
+ assert_raise_with_message(TypeError, /#{n}/) {
+ eval <<-"end;"
+ class C < c
+ end
+ end;
+ }
end
def test_cloned_singleton_method_added