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

ruby-changes:53365

From: nagachika <ko1@a...>
Date: Wed, 7 Nov 2018 00:31:20 +0900 (JST)
Subject: [ruby-changes:53365] nagachika:r65581 (ruby_2_5): merge revision(s) 65460: [Backport #15271]

nagachika	2018-11-07 00:31:15 +0900 (Wed, 07 Nov 2018)

  New Revision: 65581

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

  Log:
    merge revision(s) 65460: [Backport #15271]
    
    parse.y: last location from bison
    
    * parse.y (command): set the last location from the location
      managed by bison, so that other nodes are not needed.
      [ruby-core:89648] [Bug #15271]

  Modified directories:
    branches/ruby_2_5/
  Modified files:
    branches/ruby_2_5/parse.y
    branches/ruby_2_5/test/ruby/test_syntax.rb
    branches/ruby_2_5/version.h
Index: ruby_2_5/parse.y
===================================================================
--- ruby_2_5/parse.y	(revision 65580)
+++ ruby_2_5/parse.y	(revision 65581)
@@ -1673,7 +1673,7 @@ command		: fcall command_args       %pre https://github.com/ruby/ruby/blob/trunk/ruby_2_5/parse.y#L1673
 		    /*%%%*/
 			$$ = $1;
 			$$->nd_args = $2;
-			nd_set_last_loc($1, nd_last_loc($2));
+			nd_set_last_loc($1, @2.last_loc);
 		    /*%
 			$$ = dispatch2(command, $1, $2);
 		    %*/
@@ -1686,7 +1686,7 @@ command		: fcall command_args       %pre https://github.com/ruby/ruby/blob/trunk/ruby_2_5/parse.y#L1686
 			fixpos($$, $1);
 		    /*%%%*/
 			$$->nd_loc = @$;
-			nd_set_last_loc($1, nd_last_loc($2));
+			nd_set_last_loc($1, @2.last_loc);
 		    /*%
 		    %*/
 		    }
Index: ruby_2_5/version.h
===================================================================
--- ruby_2_5/version.h	(revision 65580)
+++ ruby_2_5/version.h	(revision 65581)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1
 #define RUBY_VERSION "2.5.4"
 #define RUBY_RELEASE_DATE "2018-11-07"
-#define RUBY_PATCHLEVEL 109
+#define RUBY_PATCHLEVEL 110
 
 #define RUBY_RELEASE_YEAR 2018
 #define RUBY_RELEASE_MONTH 11
Index: ruby_2_5/test/ruby/test_syntax.rb
===================================================================
--- ruby_2_5/test/ruby/test_syntax.rb	(revision 65580)
+++ ruby_2_5/test/ruby/test_syntax.rb	(revision 65581)
@@ -179,6 +179,11 @@ class TestSyntax < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_5/test/ruby/test_syntax.rb#L179
       bug13756 = '[ruby-core:82113] [Bug #13756]'
       assert_valid_syntax("defined? foo(**{})", bug13756)
     end;
+    assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
+    begin;
+      bug15271 = '[ruby-core:89648] [Bug #15271]'
+      assert_valid_syntax("a **{}", bug15271)
+    end;
   end
 
   def test_keyword_self_reference
Index: ruby_2_5
===================================================================
--- ruby_2_5	(revision 65580)
+++ ruby_2_5	(revision 65581)

Property changes on: ruby_2_5
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r65460

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

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