diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-28 17:10:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-28 17:10:00 +0000 |
commit | d9d34f679b2d671ec3cb5e35fc0bb518d941e091 (patch) | |
tree | a5ad9510c94450dbdb7f09d9f48c66835a8755fc /test | |
parent | b8f6031a6840265b2ee0fdf85bbcec95ae5fa5dd (diff) | |
download | ruby-d9d34f679b2d671ec3cb5e35fc0bb518d941e091.tar.gz |
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.rb | 10 |
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 |