summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 8d93cbcfd59..14915d6d229 100644
--- a/eval.c
+++ b/eval.c
@@ -1570,6 +1570,9 @@ rb_mod_nesting()
if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
cbase = cbase->nd_next;
}
+ if (ruby_wrapper && RARRAY(ary)->len == 0) {
+ rb_ary_push(ary, ruby_wrapper);
+ }
return ary;
}
@@ -7766,6 +7769,8 @@ rb_thread_remove(th)
th->gid = 0;
th->prev->next = th->next;
th->next->prev = th->prev;
+ if (th->stk_ptr) free(th->stk_ptr);
+ th->stk_ptr = 0;
}
static int