From 712a570f5624c0beaac808e03c26915c7afd0806 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 13 Jun 2015 08:39:30 +0000 Subject: * vm_core.h (rb_thread_t): add th->name. * vm.c (th_init): initialize th->name. * thread.c (Init_Thread): add Thread.name and Thread.name=. * thread.c (rb_thread_inspect): show thread's name if set. * thread.c (rb_thread_getname): defined. * thread.c (rb_thread_setname): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 408dc6dc13..2b6a917bbc 100644 --- a/vm.c +++ b/vm.c @@ -2262,6 +2262,7 @@ th_init(rb_thread_t *th, VALUE self) #if OPT_CALL_THREADED_CODE th->retval = Qundef; #endif + th->name = Qnil; } static VALUE -- cgit v1.2.3