aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_thread.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index ca162f152f..05bb536111 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -1098,4 +1098,10 @@ q.pop
t.kill
t.join
end
+
+ def test_thread_setname_uninitialized
+ bug12290 = '[ruby-core:74963] [Bug #12290]'
+ c = Class.new(Thread) {def initialize() self.name = "foo" end}
+ assert_raise(ThreadError, bug12290) {c.new {}}
+ end
end