From 17a65c320d9ce3bce3d7fe0177d74bf78314b8fa Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Jan 2015 02:13:03 +0000 Subject: parse.y: eliminate empty hashes * parse.y (assocs, assoc): eliminate splatting empty literal hashes. [ruby-core:67446] [Bug #10719] * compile.c (compile_array_): supprt splatted hash in hash type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_syntax.rb') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index eb63e3dfa7..86c1090c30 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -136,6 +136,13 @@ class TestSyntax < Test::Unit::TestCase assert_equal([1, 2], a, bug10315) end + def test_keyword_empty_splat + assert_separately([], <<-'end;') + bug10719 = '[ruby-core:67446] [Bug #10719]' + assert_valid_syntax("foo(a: 1, **{})", bug10719) + end; + end + def test_keyword_self_reference bug9593 = '[ruby-core:61299] [Bug #9593]' o = Object.new -- cgit v1.2.3