summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index f5dd37d264..84c3b741e5 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1246,6 +1246,9 @@ rb_iseq_clone(VALUE iseqval, VALUE newcbase)
}
if (newcbase) {
iseq1->cref_stack = NEW_BLOCK(newcbase);
+ if (iseq0->cref_stack->nd_next) {
+ iseq1->cref_stack->nd_next = iseq0->cref_stack->nd_next;
+ }
}
return newiseq;