aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 7190a943bd..62713e80aa 100644
--- a/thread.c
+++ b/thread.c
@@ -2776,6 +2776,7 @@ rb_thread_setname(VALUE thread, VALUE name)
{
rb_thread_t *th;
GetThreadPtr(thread, th);
+ StringValueCStr(name);
th->name = rb_str_new_frozen(name);
#if defined(HAVE_PTHREAD_SETNAME_NP)
# if defined(__linux__)