From 8e1090487e340747737ca20b78146bd92faac7b6 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Tue, 20 Feb 2024 16:20:02 -0500 Subject: YJIT: Fix calling leaf builtins with empty splat and kw_splat These don't pass anything and just need to be popped off the stack. https://github.com/ruby/ruby/actions/runs/7977363890/job/21780095289#step:13:104 --- bootstraptest/test_yjit.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 2225423aa1..14be1093e2 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -4586,3 +4586,9 @@ assert_equal 'ok', %q{ splat_nil_kw_splat([:ok]) } + +# empty splat and kwsplat into leaf builtins +assert_equal '[1, 1, 1]', %q{ + empty = [] + [1.abs(*empty), 1.abs(**nil), 1.bit_length(*empty, **nil)] +} -- cgit v1.2.3