Skip to content

Commit

Permalink
iseq.c: fix r37397
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Nov 1, 2012
1 parent 5aa7ff2 commit 0c4a27a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions 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.
Expand Down
6 changes: 5 additions & 1 deletion iseq.c
Expand Up @@ -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) {
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 0c4a27a

Please sign in to comment.