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

ruby-changes:42201

From: usa <ko1@a...>
Date: Fri, 25 Mar 2016 18:25:25 +0900 (JST)
Subject: [ruby-changes:42201] usa:r54275 (ruby_2_1): merge revision(s) 54172: [Backport #12192]

usa	2016-03-25 18:25:20 +0900 (Fri, 25 Mar 2016)

  New Revision: 54275

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

  Log:
    merge revision(s) 54172: [Backport #12192]
    
    * parse.y (parse_numvar): NTH_REF must be less than a half of
      INT_MAX, as it is left-shifted to be ORed with back-ref flag.
      [ruby-core:74444] [Bug#12192] [Fix GH-1296]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/parse.y
    branches/ruby_2_1/version.h
Index: ruby_2_1/parse.y
===================================================================
--- ruby_2_1/parse.y	(revision 54274)
+++ ruby_2_1/parse.y	(revision 54275)
@@ -6965,7 +6965,7 @@ parse_numvar(struct parser_params *parse https://github.com/ruby/ruby/blob/trunk/ruby_2_1/parse.y#L6965
     int overflow;
     unsigned long n = ruby_scan_digits(tok()+1, toklen()-1, 10, &len, &overflow);
     const unsigned long nth_ref_max =
-	(FIXNUM_MAX / 2 < INT_MAX) ? FIXNUM_MAX / 2 : INT_MAX;
+	((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
     /* NTH_REF is left-shifted to be ORed with back-ref flag and
      * turned into a Fixnum, in compile.c */
 
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 54274)
+++ ruby_2_1/ChangeLog	(revision 54275)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Fri Mar 25 18:24:04 2016  Victor Nawothnig  <Victor.Nawothnig@g...>
+
+	* parse.y (parse_numvar): NTH_REF must be less than a half of
+	  INT_MAX, as it is left-shifted to be ORed with back-ref flag.
+	  [ruby-core:74444] [Bug#12192] [Fix GH-1296]
+
 Fri Mar 25 18:18:29 2016  Eric Hodel  <drbrain@s...>
 
 	* marshal.c (r_object0):  raise ArgumentError when linking to undefined
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 54274)
+++ ruby_2_1/version.h	(revision 54275)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.9"
 #define RUBY_RELEASE_DATE "2016-03-25"
-#define RUBY_PATCHLEVEL 472
+#define RUBY_PATCHLEVEL 473
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r54172


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

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