Created
March 1, 2010 09:33
-
-
Save shugo/318231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/iseq.c b/iseq.c | |
index 80364ca..fc13d70 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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment