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

ruby-changes:53411

From: shyouhei <ko1@a...>
Date: Thu, 8 Nov 2018 14:35:02 +0900 (JST)
Subject: [ruby-changes:53411] shyouhei:r65627 (trunk): svn merge -r 65625:65623 .

shyouhei	2018-11-08 14:34:58 +0900 (Thu, 08 Nov 2018)

  New Revision: 65627

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

  Log:
    svn merge -r 65625:65623 .
    
    Was breaking make test-all

  Modified files:
    trunk/st.c
    trunk/util.c
Index: st.c
===================================================================
--- st.c	(revision 65626)
+++ st.c	(revision 65627)
@@ -2036,9 +2036,8 @@ int https://github.com/ruby/ruby/blob/trunk/st.c#L2036
 st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)
 {
     char c1, c2;
-    size_t i;
 
-    for (i = 0; i < n; i++) {
+    while (n--) {
         c1 = *s1++;
         c2 = *s2++;
         if (c1 == '\0' || c2 == '\0') {
Index: util.c
===================================================================
--- util.c	(revision 65626)
+++ util.c	(revision 65627)
@@ -35,12 +35,8 @@ ruby_scan_oct(const char *start, size_t https://github.com/ruby/ruby/blob/trunk/util.c#L35
 {
     register const char *s = start;
     register unsigned long retval = 0;
-    size_t i;
 
-    for (i = 0; i < len; i++) {
-        if ((s[0] < '0') || ('7' <= s[0])) {
-            break;
-        }
+    while (len-- && *s >= '0' && *s <= '7') {
 	retval <<= 3;
 	retval |= *s++ - '0';
     }

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

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