summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-09 02:13:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-09 02:13:03 +0000
commit17a65c320d9ce3bce3d7fe0177d74bf78314b8fa (patch)
treec0dd92ac4fa45ecc0f92c5de908626e324b16bcb /test/ruby
parent787af09e4e7500f5670078e9cf6b0381c14a2372 (diff)
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
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_syntax.rb7
1 files changed, 7 insertions, 0 deletions
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