summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--iseq.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d95c509b6..88627eedbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Aug 11 20:37:05 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * iseq.c (rb_iseq_clone): should preserve cref_stack link.
+
Mon Aug 11 20:27:12 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/dl/cfunc.c (rb_dlcfunc_call): add taint check.
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;