From fb839332f3134c456f6a679f4207620b2dbebf86 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 19 Jan 2018 03:09:24 +0000 Subject: vm_insnhelper.c: fix many keyword arguments * vm_insnhelper.c (vm_check_keyword): if the index exceeds the width of unspecified bits, that argument is specified. `unspecified_bits` still be a fixnum if the actual arguments do not exceed the limit, regardless the formal parameters size. [ruby-core:84921] [Bug #14373] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_keyword.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index 2061b49e45..9425e1df5d 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -681,12 +681,13 @@ class TestKeywordArguments < Test::Unit::TestCase def many_kwargs(a0: '', a1: '', a2: '', a3: '', a4: '', a5: '', a6: '', a7: '', b0: '', b1: '', b2: '', b3: '', b4: '', b5: '', b6: '', b7: '', c0: '', c1: '', c2: '', c3: '', c4: '', c5: '', c6: '', c7: '', - d0: '', d1: '', d2: '', d3: '', d4: '', d5: '', d6: '', d7: '') + d0: '', d1: '', d2: '', d3: '', d4: '', d5: '', d6: '', d7: '', + e0: '') [a0, a1, a2, a3, a4, a5, a6, a7, b0, b1, b2, b3, b4, b5, b6, b7, c0, c1, c2, c3, c4, c5, c6, c7, d0, d1, d2, d3, d4, d5, d6, d7, - ] + e0] end def test_many_kwargs @@ -726,5 +727,7 @@ class TestKeywordArguments < Test::Unit::TestCase assert_equal(:ok, many_kwargs(d5: :ok)[i], "#{i}: d5"); i+=1 assert_equal(:ok, many_kwargs(d6: :ok)[i], "#{i}: d6"); i+=1 assert_equal(:ok, many_kwargs(d7: :ok)[i], "#{i}: d7"); i+=1 + + assert_equal(:ok, many_kwargs(e0: :ok)[i], "#{i}: e0"); i+=1 end end -- cgit v1.2.3