aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 8c689bd5d1..78471c28ee 100644
--- a/thread.c
+++ b/thread.c
@@ -341,7 +341,7 @@ thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg)
/* setup thread environment */
th->first_args = args;
- th->first_proc = rb_block_proc();
+ th->first_proc = fn ? Qfalse : rb_block_proc();
th->first_func = fn;
th->first_func_arg = arg;