summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-01 12:20:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-01 12:20:00 +0000
commit0c4a27a5a207b7ab30d4b2edd16e0b75e551e1da (patch)
treede774a451ce819f4de7bb49689770ca74a3e10ad
parent5aa7ff2b8a41ad688465b3d919aab62d214c74c3 (diff)
iseq.c: fix r37397
* iseq.c (set_relation): parent_iseq need to be set regardless iseq type. fix r37397. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--iseq.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 636f4ebfe1..2885d2b5b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Nov 1 21:19:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * iseq.c (set_relation): parent_iseq need to be set regardless iseq
+ type. fix r37397.
+
Thu Nov 1 19:47:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
diff --git a/iseq.c b/iseq.c
index 029dfa860c..aef63eb1df 100644
--- a/iseq.c
+++ b/iseq.c
@@ -199,6 +199,7 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
{
const VALUE type = iseq->type;
rb_thread_t *th = GET_THREAD();
+ rb_iseq_t *piseq;
/* set class nest stack */
if (type == ISEQ_TYPE_TOP) {
@@ -221,10 +222,13 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
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)) {
+ GetISeqPtr(parent, piseq);
iseq->parent_iseq = piseq;
}
}