summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-10 16:07:06 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-10 16:07:06 +0000
commite3c25091cda672ff0ebe1dec996d859888907644 (patch)
tree84b40fdf51f069b14171d6a859627f0dbcc53bcd /iseq.c
parentfec209551a1751de79b7f0257ae8533e1bdf3c7e (diff)
* iseq.c (rb_iseq_clone): sets local_iseq and klass properly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 80364ca751..fc13d70cc0 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1344,11 +1344,15 @@ rb_iseq_clone(VALUE iseqval, VALUE newcbase)
if (!iseq1->orig) {
iseq1->orig = iseqval;
}
+ if (iseq0->local_iseq == iseq0) {
+ iseq1->local_iseq = iseq1;
+ }
if (newcbase) {
iseq1->cref_stack = NEW_BLOCK(newcbase);
if (iseq0->cref_stack->nd_next) {
iseq1->cref_stack->nd_next = iseq0->cref_stack->nd_next;
}
+ iseq1->klass = newcbase;
}
return newiseq;