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

ruby-changes:42261

From: nagachika <ko1@a...>
Date: Tue, 29 Mar 2016 01:28:58 +0900 (JST)
Subject: [ruby-changes:42261] nagachika:r54335 (ruby_2_2): merge revision(s) 54172: [Backport #12192]

nagachika	2016-03-29 01:28:54 +0900 (Tue, 29 Mar 2016)

  New Revision: 54335

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

  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_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/parse.y
    branches/ruby_2_2/version.h
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 54334)
+++ ruby_2_2/version.h	(revision 54335)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.5"
 #define RUBY_RELEASE_DATE "2016-03-29"
-#define RUBY_PATCHLEVEL 277
+#define RUBY_PATCHLEVEL 278
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 54334)
+++ ruby_2_2/ChangeLog	(revision 54335)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Tue Mar 29 01:27:52 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]
+
 Tue Mar 29 01:24:55 2016  NARUSE, Yui  <naruse@r...>
 
 	* enc/trans/JIS: update Unicode's notice. [Bug #11844]
Index: ruby_2_2/parse.y
===================================================================
--- ruby_2_2/parse.y	(revision 54334)
+++ ruby_2_2/parse.y	(revision 54335)
@@ -7608,7 +7608,7 @@ parse_numvar(struct parser_params *parse https://github.com/ruby/ruby/blob/trunk/ruby_2_2/parse.y#L7608
     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 */
 

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


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

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