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

ruby-changes:38202

From: usa <ko1@a...>
Date: Mon, 13 Apr 2015 16:42:20 +0900 (JST)
Subject: [ruby-changes:38202] usa:r50283 (ruby_2_1): merge revision(s) 50265: [Backport #10957]

usa	2015-04-13 16:41:24 +0900 (Mon, 13 Apr 2015)

  New Revision: 50283

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

  Log:
    merge revision(s) 50265: [Backport #10957]
    
    * parse.y (arg): fix segfault by null caused by syntax error.
      [ruby-core:68851] [Bug #10957]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/parse.y
    branches/ruby_2_1/test/ruby/test_syntax.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 50282)
+++ ruby_2_1/ChangeLog	(revision 50283)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Mon Apr 13 16:39:57 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (arg): fix segfault by null caused by syntax error.
+	  [ruby-core:68851] [Bug #10957]
+
 Tue Mar 31 00:49:23 2015  Naohisa Goto  <ngotogenome@g...>
 
 	* gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
Index: ruby_2_1/parse.y
===================================================================
--- ruby_2_1/parse.y	(revision 50282)
+++ ruby_2_1/parse.y	(revision 50283)
@@ -2047,7 +2047,7 @@ arg		: lhs '=' arg https://github.com/ruby/ruby/blob/trunk/ruby_2_1/parse.y#L2047
 			value_expr($3);
 			$$ = NEW_DOT2($1, $3);
 			if ($1 && nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
-			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
+			    $3 && nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
 			    deferred_nodes = list_append(deferred_nodes, $$);
 			}
 		    /*%
@@ -2061,7 +2061,7 @@ arg		: lhs '=' arg https://github.com/ruby/ruby/blob/trunk/ruby_2_1/parse.y#L2061
 			value_expr($3);
 			$$ = NEW_DOT3($1, $3);
 			if ($1 && nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
-			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
+			    $3 && nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
 			    deferred_nodes = list_append(deferred_nodes, $$);
 			}
 		    /*%
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 50282)
+++ ruby_2_1/version.h	(revision 50283)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.5"
-#define RUBY_RELEASE_DATE "2015-03-31"
-#define RUBY_PATCHLEVEL 329
+#define RUBY_RELEASE_DATE "2015-04-13"
+#define RUBY_PATCHLEVEL 330
 
 #define RUBY_RELEASE_YEAR 2015
-#define RUBY_RELEASE_MONTH 3
-#define RUBY_RELEASE_DAY 31
+#define RUBY_RELEASE_MONTH 4
+#define RUBY_RELEASE_DAY 13
 
 #include "ruby/version.h"
 
Index: ruby_2_1/test/ruby/test_syntax.rb
===================================================================
--- ruby_2_1/test/ruby/test_syntax.rb	(revision 50282)
+++ ruby_2_1/test/ruby/test_syntax.rb	(revision 50283)
@@ -412,6 +412,8 @@ eom https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/ruby/test_syntax.rb#L412
     bug10957 = '[ruby-core:68477] [Bug #10957]'
     assert_ruby_status(['-c', '-e', 'p ()..0'], "", bug10957)
     assert_ruby_status(['-c', '-e', 'p ()...0'], "", bug10957)
+    assert_syntax_error('0..%w.', /unterminated string/, bug10957)
+    assert_syntax_error('0...%w.', /unterminated string/, bug10957)
   end
 
   private

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


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

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