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

ruby-changes:40274

From: nobu <ko1@a...>
Date: Thu, 29 Oct 2015 23:01:28 +0900 (JST)
Subject: [ruby-changes:40274] nobu:r52355 (trunk): indent

nobu	2015-10-29 23:01:13 +0900 (Thu, 29 Oct 2015)

  New Revision: 52355

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

  Log:
    indent
    
    * encoding.c (enc_compatible_latter): adjust indent.

  Modified files:
    trunk/ChangeLog
    trunk/encoding.c
Index: encoding.c
===================================================================
--- encoding.c	(revision 52354)
+++ encoding.c	(revision 52355)
@@ -890,19 +890,19 @@ enc_compatible_latter(VALUE str1, VALUE https://github.com/ruby/ruby/blob/trunk/encoding.c#L890
 
     isstr2 = RB_TYPE_P(str2, T_STRING);
     if (isstr2 && RSTRING_LEN(str2) == 0)
-      return enc1;
+	return enc1;
     isstr1 = RB_TYPE_P(str1, T_STRING);
     if (isstr1 && RSTRING_LEN(str1) == 0)
-      return (rb_enc_asciicompat(enc1) && rb_enc_str_asciionly_p(str2)) ? enc1 : enc2;
+	return (rb_enc_asciicompat(enc1) && rb_enc_str_asciionly_p(str2)) ? enc1 : enc2;
     if (!rb_enc_asciicompat(enc1) || !rb_enc_asciicompat(enc2)) {
 	return 0;
     }
 
     /* objects whose encoding is the same of contents */
     if (!isstr2 && idx2 == ENCINDEX_US_ASCII)
-      return enc1;
+	return enc1;
     if (!isstr1 && idx1 == ENCINDEX_US_ASCII)
-      return enc2;
+	return enc2;
 
     if (!isstr1) {
 	VALUE tmp = str1;
@@ -931,7 +931,7 @@ enc_compatible_latter(VALUE str1, VALUE https://github.com/ruby/ruby/blob/trunk/encoding.c#L931
 	    }
 	}
 	if (cr1 == ENC_CODERANGE_7BIT)
-	  return enc2;
+	    return enc2;
     }
     return 0;
 }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52354)
+++ ChangeLog	(revision 52355)
@@ -6,7 +6,7 @@ Thu Oct 29 18:42:30 2015  Koichi Sasada https://github.com/ruby/ruby/blob/trunk/ChangeLog#L6
 Thu Oct 29 18:05:22 2015  Koichi Sasada  <ko1@a...>
 
 	* encoding.c (rb_enc_check_str): add for performance.
-	  This function only accept T_STRING (and T_REGEXP).
+	  This function only accepts T_STRING (and T_REGEXP).
 
 	  This patch improves performance of a tiny_segmenter benchmark
 	  (num=2) 2.54sec -> 2.42sec on my machine.

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

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