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

ruby-changes:12621

From: nobu <ko1@a...>
Date: Fri, 31 Jul 2009 11:48:30 +0900 (JST)
Subject: [ruby-changes:12621] Ruby:r24334 (trunk): * compile.c (iseq_compile_each): used more appropriate construct.

nobu	2009-07-31 11:48:10 +0900 (Fri, 31 Jul 2009)

  New Revision: 24334

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

  Log:
    * compile.c (iseq_compile_each): used more appropriate construct.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24333)
+++ ChangeLog	(revision 24334)
@@ -1,3 +1,7 @@
+Fri Jul 31 11:48:03 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* compile.c (iseq_compile_each): used more appropriate construct.
+
 Fri Jul 31 10:54:08 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (literal_concat_gen): reduced unnecessary node at string
Index: compile.c
===================================================================
--- compile.c	(revision 24333)
+++ compile.c	(revision 24334)
@@ -4188,10 +4188,9 @@
       case NODE_RETURN:{
 	rb_iseq_t *is = iseq;
 
-	while (is) {
+	if (is) {
 	    if (is->type == ISEQ_TYPE_TOP || is->type == ISEQ_TYPE_CLASS) {
 		COMPILE_ERROR((ERROR_ARGS "Invalid return"));
-		break;
 	    }
 	    else {
 		LABEL *splabel = 0;
@@ -4219,7 +4218,6 @@
 			ADD_INSN(ret, nd_line(node), pop);
 		    }
 		}
-		break;
 	    }
 	}
 	break;

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

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