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

ruby-changes:39524

From: usa <ko1@a...>
Date: Mon, 17 Aug 2015 17:10:36 +0900 (JST)
Subject: [ruby-changes:39524] usa:r51605 (ruby_2_1): merge revision(s) 51350: [Backport #11380]

usa	2015-08-17 17:10:19 +0900 (Mon, 17 Aug 2015)

  New Revision: 51605

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

  Log:
    merge revision(s) 51350: [Backport #11380]
    
    * parse.y (lambda_body): pop cmdarg stack for lookahead
      token.  [ruby-core:70067] [Bug #11380]

  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 51604)
+++ ruby_2_1/ChangeLog	(revision 51605)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Mon Aug 17 17:09:02 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (lambda_body): pop cmdarg stack for lookahead
+	  token.  [ruby-core:70067] [Bug #11380]
+
 Mon Aug 17 17:04:57 2015  Jeremy Evans  <merch-redmine@j...>
 
 	* test/openssl/test_ssl.rb: Fix LocalJumpErrors being raised
Index: ruby_2_1/parse.y
===================================================================
--- ruby_2_1/parse.y	(revision 51604)
+++ ruby_2_1/parse.y	(revision 51605)
@@ -3475,6 +3475,7 @@ lambda		:   { https://github.com/ruby/ruby/blob/trunk/ruby_2_1/parse.y#L3475
 		    {
 			lpar_beg = $<num>2;
 			cmdarg_stack = $<val>5;
+			CMDARG_LEXPOP();
 		    /*%%%*/
 			$$ = NEW_LAMBDA($3, $6);
 			nd_set_line($$, $<num>4);
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 51604)
+++ ruby_2_1/version.h	(revision 51605)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.7"
 #define RUBY_RELEASE_DATE "2015-08-17"
-#define RUBY_PATCHLEVEL 388
+#define RUBY_PATCHLEVEL 389
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_1/test/ruby/test_syntax.rb
===================================================================
--- ruby_2_1/test/ruby/test_syntax.rb	(revision 51604)
+++ ruby_2_1/test/ruby/test_syntax.rb	(revision 51605)
@@ -271,6 +271,11 @@ WARN https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/ruby/test_syntax.rb#L271
     assert_valid_syntax('p ->() do a() do end end', bug11107)
   end
 
+  def test_do_block_after_lambda
+    bug11380 = '[ruby-core:70067] [Bug #11380]'
+    assert_valid_syntax('p -> { :hello }, a: 1 do end', bug11380)
+  end
+
   def test_reserved_method_no_args
     bug6403 = '[ruby-dev:45626]'
     assert_valid_syntax("def self; :foo; end", __FILE__, bug6403)

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


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

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