summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 13:25:14 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 13:25:14 +0000
commit6170db409b52e1048f68fe6a883f40e0ab72be62 (patch)
tree76ee0353d3fedd90b5427fa32789219649885499 /test
parentb66b645230542bf2a1a782d80a7426947a9a273f (diff)
merge revision(s) 49193: [Backport #10719]
* 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/branches/ruby_2_2@49302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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