aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iseq.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/iseq.c b/iseq.c
index 348836b99a..029dfa860c 100644
--- a/iseq.c
+++ b/iseq.c
@@ -213,30 +213,18 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
cref->nd_next = iseq->cref_stack;
iseq->cref_stack = cref;
}
+ iseq->local_iseq = iseq;
}
else if (type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) {
iseq->cref_stack = NEW_CREF(0); /* place holder */
iseq->cref_stack->nd_refinements = Qnil;
- }
- else if (RTEST(parent)) {
- rb_iseq_t *piseq;
- GetISeqPtr(parent, piseq);
- iseq->cref_stack = piseq->cref_stack;
- }
-
- if (type == ISEQ_TYPE_TOP ||
- type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) {
iseq->local_iseq = iseq;
}
else if (RTEST(parent)) {
rb_iseq_t *piseq;
GetISeqPtr(parent, piseq);
+ iseq->cref_stack = piseq->cref_stack;
iseq->local_iseq = piseq->local_iseq;
- }
-
- if (RTEST(parent)) {
- rb_iseq_t *piseq;
- GetISeqPtr(parent, piseq);
iseq->parent_iseq = piseq;
}
}