diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-01 08:21:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-01 08:21:39 +0000 |
commit | 06c7ede25923582b7f61c85920cd195b3c0447ce (patch) | |
tree | 93c5ca55a6cc67a2d8c1e97df001589fdd114aee /test | |
parent | 767c502252daf751a2efbd0acc5766cd5492e9fb (diff) | |
download | ruby-06c7ede25923582b7f61c85920cd195b3c0447ce.tar.gz |
vm_insnhelper.c: extract keyword arguments after splat
* vm_insnhelper.c (vm_yield_setup_block_args): split single parameter
if any keyword arguments exist, and then extract keyword arguments.
[ruby-core:55203] [Bug #8463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_keyword.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index ed1f79cfd3..4ff7c40321 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -263,9 +263,14 @@ class TestKeywordArguments < Test::Unit::TestCase def test_rest_keyrest bug7665 = '[ruby-core:51278]' + bug8463 = '[ruby-core:55203] [Bug #8463]' expect = [*%w[foo bar], {zzz: 42}] assert_equal(expect, rest_keyrest(*expect), bug7665) - assert_equal(expect, proc {|*args, **opt| next *args, opt}.call(*expect), bug7665) + pr = proc {|*args, **opt| next *args, opt} + assert_equal(expect, pr.call(*expect), bug7665) + assert_equal(expect, pr.call(expect), bug8463) + pr = proc {|a, *b, **opt| next a, *b, opt} + assert_equal(expect, pr.call(expect), bug8463) end def test_bare_kwrest |