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

ruby-changes:45880

From: naruse <ko1@a...>
Date: Mon, 13 Mar 2017 16:03:38 +0900 (JST)
Subject: [ruby-changes:45880] naruse:r57953 (ruby_2_4): merge revision(s) 57269, 57277:

naruse	2017-03-13 16:03:32 +0900 (Mon, 13 Mar 2017)

  New Revision: 57953

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

  Log:
    merge revision(s) 57269,57277:
    
    bignum.c: fix rb_cstr_parse_inum endp
    
    * bignum.c (rb_cstr_parse_inum): stores the address of the first
      invalid character when str is too big or contains an underscore.
    bignum.c: unnecessary check
    
    * bignum.c (rb_cstr_parse_inum): remove unnecessary check.
      successive sign is rejected by conv_digit.

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/bignum.c
    branches/ruby_2_4/version.h
Index: ruby_2_4/bignum.c
===================================================================
--- ruby_2_4/bignum.c	(revision 57952)
+++ ruby_2_4/bignum.c	(revision 57953)
@@ -4057,9 +4057,6 @@ rb_cstr_parse_inum(const char *str, ssiz https://github.com/ruby/ruby/blob/trunk/ruby_2_4/bignum.c#L4057
 	    sign = 0;
 	}
 	ASSERT_LEN();
-	if (str[0] == '+' || str[0] == '-') {
-	    goto bad;
-	}
     }
     if (base <= 0) {
 	if (str[0] == '0' && len > 1) {
@@ -4172,6 +4169,7 @@ rb_cstr_parse_inum(const char *str, ssiz https://github.com/ruby/ruby/blob/trunk/ruby_2_4/bignum.c#L4169
     digits_start = str;
     if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
 	goto bad;
+    if (endp) *endp = (char *)(str + len);
     digits_end = digits_start + len;
 
     if (POW2_P(base)) {
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 57952)
+++ ruby_2_4/version.h	(revision 57953)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.0"
 #define RUBY_RELEASE_DATE "2017-03-13"
-#define RUBY_PATCHLEVEL 98
+#define RUBY_PATCHLEVEL 99
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r57269,57277


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

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