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

ruby-changes:39438

From: nagachika <ko1@a...>
Date: Tue, 11 Aug 2015 01:08:47 +0900 (JST)
Subject: [ruby-changes:39438] nagachika:r51519 (ruby_2_2): merge revision(s) 51350: [Backport #11380] [Backport #11389]

nagachika	2015-08-11 01:08:30 +0900 (Tue, 11 Aug 2015)

  New Revision: 51519

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

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

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/parse.y
    branches/ruby_2_2/test/ruby/test_syntax.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 51518)
+++ ruby_2_2/ChangeLog	(revision 51519)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Tue Aug 11 00:42:53 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (lambda_body): pop cmdarg stack for lookahead
+	  token.  [ruby-core:70067] [Bug #11380]
+
 Tue Aug 11 00:21:56 2015  NARUSE, Yui  <naruse@r...>
 
 	* ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,
Index: ruby_2_2/parse.y
===================================================================
--- ruby_2_2/parse.y	(revision 51518)
+++ ruby_2_2/parse.y	(revision 51519)
@@ -3540,6 +3540,7 @@ lambda		:   { https://github.com/ruby/ruby/blob/trunk/ruby_2_2/parse.y#L3540
 		    {
 			lpar_beg = $<num>2;
 			cmdarg_stack = $<val>5;
+			CMDARG_LEXPOP();
 		    /*%%%*/
 			$$ = NEW_LAMBDA($3, $6);
 			nd_set_line($$, $<num>4);
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 51518)
+++ ruby_2_2/version.h	(revision 51519)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.3"
 #define RUBY_RELEASE_DATE "2015-08-11"
-#define RUBY_PATCHLEVEL 151
+#define RUBY_PATCHLEVEL 152
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_2/test/ruby/test_syntax.rb
===================================================================
--- ruby_2_2/test/ruby/test_syntax.rb	(revision 51518)
+++ ruby_2_2/test/ruby/test_syntax.rb	(revision 51519)
@@ -405,6 +405,11 @@ WARN https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_syntax.rb#L405
     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_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r51350


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

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