mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
5aa7ff2b8a
commit
0c4a27a5a2
2 changed files with 10 additions and 1 deletions
|
@ -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>
|
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.
|
* thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
|
||||||
|
|
6
iseq.c
6
iseq.c
|
@ -199,6 +199,7 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
|
||||||
{
|
{
|
||||||
const VALUE type = iseq->type;
|
const VALUE type = iseq->type;
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
|
rb_iseq_t *piseq;
|
||||||
|
|
||||||
/* set class nest stack */
|
/* set class nest stack */
|
||||||
if (type == ISEQ_TYPE_TOP) {
|
if (type == ISEQ_TYPE_TOP) {
|
||||||
|
@ -221,10 +222,13 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
|
||||||
iseq->local_iseq = iseq;
|
iseq->local_iseq = iseq;
|
||||||
}
|
}
|
||||||
else if (RTEST(parent)) {
|
else if (RTEST(parent)) {
|
||||||
rb_iseq_t *piseq;
|
|
||||||
GetISeqPtr(parent, piseq);
|
GetISeqPtr(parent, piseq);
|
||||||
iseq->cref_stack = piseq->cref_stack;
|
iseq->cref_stack = piseq->cref_stack;
|
||||||
iseq->local_iseq = piseq->local_iseq;
|
iseq->local_iseq = piseq->local_iseq;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RTEST(parent)) {
|
||||||
|
GetISeqPtr(parent, piseq);
|
||||||
iseq->parent_iseq = piseq;
|
iseq->parent_iseq = piseq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue