summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2024-02-20 16:20:02 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2024-02-20 16:53:36 -0500
commit8e1090487e340747737ca20b78146bd92faac7b6 (patch)
tree2102d0b9ead9afb30a2bdafd9ceefe15b1266a27 /bootstraptest
parent9216a2ac43a6e8a22efad582c4460c51cab72674 (diff)
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
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb6
1 files changed, 6 insertions, 0 deletions
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)]
+}