summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-13 06:17:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-13 06:17:08 +0000
commitd6a977f667f9d824cfe95976f3afc31e55580edb (patch)
tree405767602558aeb10a1dcd3f7c7096eed2ad73c1 /test
parentdb83618d2c49cbab8b78e31ecf5a8979895bc5d6 (diff)
* parse.y (block_param, f_args): add rules for the case arguments
begin with kwrest. [ruby-core:42455][Bug #5989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index f247b4c6dc..532b989bbd 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -77,6 +77,12 @@ class TestSyntax < Test::Unit::TestCase
end
end
+ def test_keyword_rest
+ bug5989 = '[ruby-core:42455]'
+ assert_valid_syntax("def kwrest_test(**a) end", __FILE__)
+ assert_valid_syntax("def kwrest_test(**a, &b) end", __FILE__)
+ end
+
private
def make_tmpsrc(f, src)