[前][次][番号順一覧][スレッド一覧]

ruby-changes:25351

From: nobu <ko1@a...>
Date: Thu, 1 Nov 2012 21:20:10 +0900 (JST)
Subject: [ruby-changes:25351] nobu:r37403 (trunk): iseq.c: fix r37397

nobu	2012-11-01 21:20:00 +0900 (Thu, 01 Nov 2012)

  New Revision: 37403

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37403

  Log:
    iseq.c: fix r37397
    
    * iseq.c (set_relation): parent_iseq need to be set regardless iseq
      type.  fix r37397.

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37402)
+++ ChangeLog	(revision 37403)
@@ -1,3 +1,8 @@
+Thu Nov  1 21:19:56 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
Index: iseq.c
===================================================================
--- iseq.c	(revision 37402)
+++ iseq.c	(revision 37403)
@@ -199,6 +199,7 @@
 {
     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 @@
 	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;
     }
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]