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 /test | |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |