summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/iseq.c b/iseq.c
index 8b75ac6..b8ae57b 100644
--- a/iseq.c
+++ b/iseq.c
@@ -113,6 +113,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
rb_gc_mark(body->location.base_label);
rb_gc_mark(body->location.path);
RUBY_MARK_UNLESS_NULL(body->location.absolute_path);
+ RUBY_MARK_UNLESS_NULL((VALUE)body->parent_iseq);
}
if (FL_TEST(iseq, ISEQ_NOT_LOADED_YET)) {
@@ -711,11 +712,7 @@ rb_iseq_coverage(const rb_iseq_t *iseq)
static void
iseqw_mark(void *ptr)
{
- const rb_iseq_t *iseq = ptr;
rb_gc_mark((VALUE)ptr);
- while ((iseq = iseq->body->parent_iseq) != NULL) {
- rb_gc_mark((VALUE)iseq);
- }
}
static size_t