diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-20 05:48:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-20 05:48:26 +0000 |
commit | cc98157ff823a7db1b2308e7e5a5a82f860bfd7a (patch) | |
tree | 0c434718876855a233da6a44a42ab2a659d05512 /test/ruby | |
parent | 491b3fcbb93cd305924d8a7e6f07eb88a0272002 (diff) | |
download | ruby-cc98157ff823a7db1b2308e7e5a5a82f860bfd7a.tar.gz |
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/trunk@59375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 5f0a236619..bd93285ac4 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -169,10 +169,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 |