From d49fca8894d05d124277f6be448994f3f7ccdcc6 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 2 Nov 2017 07:52:49 +0000 Subject: compile.c: kw splat after splat * compile.c (setup_args): set keyword splat flag after splat arguments. [ruby-core:83638] [Bug #10856] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_keyword.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index e2bdc34731..f4cc7bc9d6 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -513,11 +513,17 @@ class TestKeywordArguments < Test::Unit::TestCase } o = {} assert_equal(:ok, m.f(**o), '[ruby-core:68124] [Bug #10856]') + a = [] + assert_equal(:ok, m.f(*a, **o), '[ruby-core:83638] [Bug #10856]') o = {a: 42} assert_equal({a: 42}, m.f2(**o), '[ruby-core:82280] [Bug #13791]') assert_equal({a: 42}, m.f2("a".to_sym => 42), '[ruby-core:82291] [Bug #13793]') + + o = {} + a = [:ok] + assert_equal(:ok, m.f2(*a, **o), '[ruby-core:83638] [Bug #10856]') end def test_gced_object_in_stack -- cgit v1.2.3