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

ruby-changes:32624

From: nobu <ko1@a...>
Date: Sat, 25 Jan 2014 12:15:35 +0900 (JST)
Subject: [ruby-changes:32624] nobu:r44703 (trunk): insns.def: adjust style

nobu	2014-01-25 12:15:30 +0900 (Sat, 25 Jan 2014)

  New Revision: 44703

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

  Log:
    insns.def: adjust style
    
    * insns.def (opt_mod, opt_aset_with, opt_aref_with, opt_regexpmatch1):
      adjust style, do not cuddle else up.

  Modified files:
    trunk/insns.def
Index: insns.def
===================================================================
--- insns.def	(revision 44702)
+++ insns.def	(revision 44703)
@@ -1550,7 +1550,8 @@ opt_mod https://github.com/ruby/ruby/blob/trunk/insns.def#L1550
 	y = FIX2LONG(obj);
 	if (x > 0 && y > 0) {
 	    val = LONG2FIX(x % y);
-	} else {
+	}
+	else {
 	    /* copied from numeric.c#fixdivmod */
 	    long div, mod;
 
@@ -1914,7 +1915,8 @@ opt_aset_with https://github.com/ruby/ruby/blob/trunk/insns.def#L1915
 {
     if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
 	rb_hash_aset(recv, key, val);
-    } else {
+    }
+    else {
 	PUSH(recv);
 	PUSH(rb_str_resurrect(key));
 	PUSH(val);
@@ -1935,7 +1937,8 @@ opt_aref_with https://github.com/ruby/ruby/blob/trunk/insns.def#L1937
 {
     if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
 	val = rb_hash_aref(recv, key);
-    } else {
+    }
+    else {
 	PUSH(recv);
 	PUSH(rb_str_resurrect(key));
 	CALL_SIMPLE_METHOD(recv);
@@ -2134,7 +2137,8 @@ opt_regexpmatch1 https://github.com/ruby/ruby/blob/trunk/insns.def#L2137
 {
     if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
 	val = rb_reg_match(r, obj);
-    } else {
+    }
+    else {
 	val = rb_funcall(r, idEqTilde, 1, obj);
     }
 }

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

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