diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_thread.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index dc929ce4fd..c90c369bb7 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1082,4 +1082,10 @@ q.pop t.kill t.join end + + def test_thread_setname_in_initialize + bug12290 = '[ruby-core:74963] [Bug #12290]' + c = Class.new(Thread) {def initialize() self.name = "foo"; super; end} + assert_equal("foo", c.new {Thread.current.name}.value) + end end |
