ruby-changes:6038
From: wanabe <ko1@a...>
Date: Tue, 24 Jun 2008 00:12:57 +0900 (JST)
Subject: [ruby-changes:6038] Ruby:r17548 (trunk): * compile.c (iseq_build_from_ary): fix expression to obtain
wanabe 2008-06-24 00:12:29 +0900 (Tue, 24 Jun 2008) New Revision: 17548 Modified files: trunk/ChangeLog trunk/compile.c Log: * compile.c (iseq_build_from_ary): fix expression to obtain iseq->local_size and iseq->local_table_size. [ruby-dev:35205] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=17548&r2=17547&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17548&r2=17547&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 17547) +++ ChangeLog (revision 17548) @@ -1,3 +1,7 @@ +Tue Jun 24 00:10:53 2008 wanabe <s.wanabe@g...> + * compile.c (iseq_build_from_ary): fix expression to obtain + iseq->local_size and iseq->local_table_size. [ruby-dev:35205] + Mon Jun 23 11:31:41 2008 Yukihiro Matsumoto <matz@r...> * lib/mathn.rb (Rational::power2): removed incomplete method. Index: compile.c =================================================================== --- compile.c (revision 17547) +++ compile.c (revision 17548) @@ -4983,22 +4983,16 @@ VALUE exception, VALUE body) { int i; - int opt = 0; ID *tbl; struct st_table *labels_table = st_init_numtable(); DECL_ANCHOR(anchor); INIT_ANCHOR(anchor); - if (iseq->type == ISEQ_TYPE_METHOD || - iseq->type == ISEQ_TYPE_TOP || - iseq->type == ISEQ_TYPE_CLASS) { - opt = 1; - } - iseq->local_table_size = opt + RARRAY_LEN(locals); + iseq->local_table_size = RARRAY_LEN(locals); iseq->local_table = tbl = (ID *)ALLOC_N(ID *, iseq->local_table_size); - iseq->local_size = opt + iseq->local_table_size; + iseq->local_size = iseq->local_table_size + 1; for (i=0; i<RARRAY_LEN(locals); i++) { VALUE lv = RARRAY_PTR(locals)[i]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/