ruby-changes:47725
From: nagachika <ko1@a...>
Date: Tue, 12 Sep 2017 02:27:08 +0900 (JST)
Subject: [ruby-changes:47725] nagachika:r59841 (ruby_2_4): merge revision(s) 59375: [Backport #13756]
nagachika 2017-09-12 02:27:01 +0900 (Tue, 12 Sep 2017) New Revision: 59841 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59841 Log: merge revision(s) 59375: [Backport #13756] parse.y: empty hash in defined * parse.y (command): NODE_ARRAY with NULL is invalid. traversal in defined_expr0 is simplified than iseq_compile_each0. [ruby-core:82113] [Bug #13756] Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/parse.y branches/ruby_2_4/test/ruby/test_syntax.rb branches/ruby_2_4/version.h Index: ruby_2_4/test/ruby/test_syntax.rb =================================================================== --- ruby_2_4/test/ruby/test_syntax.rb (revision 59840) +++ ruby_2_4/test/ruby/test_syntax.rb (revision 59841) @@ -169,10 +169,16 @@ class TestSyntax < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_syntax.rb#L169 end def test_keyword_empty_splat - assert_separately([], <<-'end;') + assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}") + begin; bug10719 = '[ruby-core:67446] [Bug #10719]' assert_valid_syntax("foo(a: 1, **{})", bug10719) end; + assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}") + begin; + bug13756 = '[ruby-core:82113] [Bug #13756]' + assert_valid_syntax("defined? foo(**{})", bug13756) + end; end def test_keyword_self_reference Index: ruby_2_4/parse.y =================================================================== --- ruby_2_4/parse.y (revision 59840) +++ ruby_2_4/parse.y (revision 59841) @@ -2462,7 +2462,7 @@ call_args : command https://github.com/ruby/ruby/blob/trunk/ruby_2_4/parse.y#L2462 | assocs opt_block_arg { /*%%%*/ - $$ = NEW_LIST($1 ? new_hash($1) : 0); + $$ = $1 ? NEW_LIST(new_hash($1)) : 0; $$ = arg_blk_pass($$, $2); /*% $$ = arg_add_assocs(arg_new(), $1); Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 59840) +++ ruby_2_4/version.h (revision 59841) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.2" -#define RUBY_RELEASE_DATE "2017-09-10" -#define RUBY_PATCHLEVEL 196 +#define RUBY_RELEASE_DATE "2017-09-12" +#define RUBY_PATCHLEVEL 197 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 9 -#define RUBY_RELEASE_DAY 10 +#define RUBY_RELEASE_DAY 12 #include "ruby/version.h" Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 59840) +++ ruby_2_4 (revision 59841) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r59375 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/