diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-14 04:32:54 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-14 04:32:54 +0000 |
commit | ac6f2894ea8fd6c9718ececb1245b2b11aae8e82 (patch) | |
tree | 77159611e91a615e251d0bf64b4a26edf3d32c97 | |
parent | 04667398c938a408e7602fc6992f594290baff6f (diff) |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | test/ruby/test_syntax.rb | 8 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,11 @@ +Thu Sep 14 13:32:39 2017 Nobuyoshi Nakada <nobu@ruby-lang.org> + + 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] + Thu Sep 14 13:26:31 2017 Nobuyoshi Nakada <nobu@ruby-lang.org> string.c: fix false coderange @@ -2506,7 +2506,7 @@ call_args : command | 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); diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 56ea659191..29851b79de 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -155,10 +155,16 @@ class TestSyntax < Test::Unit::TestCase 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 @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.3.5" #define RUBY_RELEASE_DATE "2017-09-14" -#define RUBY_PATCHLEVEL 374 +#define RUBY_PATCHLEVEL 375 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 9 |