aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_class.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 36aeaf2bdf..3508061840 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -193,6 +193,9 @@ class TestClass < Test::Unit::TestCase
assert_raise(TypeError) { Class.new(c) }
assert_raise(TypeError) { Class.new(Class) }
assert_raise(TypeError) { eval("class Foo < Class; end") }
+ m = "M\u{1f5ff}"
+ o = Class.new {break eval("class #{m}; self; end.new")}
+ assert_raise_with_message(TypeError, /#{m}/) {Class.new(o)}
end
def test_initialize_copy