summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-16 08:29:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-16 08:29:21 +0000
commitc5e9beac25c3cf4e5ff317468db043455c504a73 (patch)
tree058d2f489e2c0442bed2e0c55f12bf3af3966474 /test
parent962909f0efdce5852eac855f891b42edfa8d6817 (diff)
thread.c: class name encoding
* thread.c (thread_s_new): preserve the encoding of the class name in an error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_thread.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 87d5f0f79e..ade680c55b 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -1033,4 +1033,17 @@ q.pop
assert_not_predicate(status, :signaled?, FailDesc[status, bug9751, output])
assert_predicate(status, :success?, bug9751)
end if Process.respond_to?(:fork)
+
+ def test_subclass_no_initialize
+ t = Module.new do
+ break eval("class C\u{30b9 30ec 30c3 30c9} < Thread; self; end")
+ end
+ t.class_eval do
+ def initialize
+ end
+ end
+ assert_raise_with_message(ThreadError, /C\u{30b9 30ec 30c3 30c9}/) do
+ t.new {}
+ end
+ end
end