diff options
author | Jimmy Miller <jimmy.miller@shopify.com> | 2023-03-02 10:57:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 10:57:19 -0500 |
commit | ce476cdfb7d6ffbff3d6f179da22f16d18d2f12a (patch) | |
tree | c9f61dee8c191f7fc55ee3fde86699760c4a316a /bootstraptest | |
parent | 5875fce6ce678c444456cc7eed6f28ef000dac24 (diff) | |
download | ruby-ce476cdfb7d6ffbff3d6f179da22f16d18d2f12a.tar.gz |
YJIT: Fix cfunc splat
Follow-up for cb8a040b7906c09d9d3ac3d3fe853f633005024f.
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 568cc583b1..b064bcdde7 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -3585,7 +3585,7 @@ assert_equal 'true', %q{ 1.send(:==, 1, *[]) } -# Test send with splat to a cfunc +# Test empty splat with cfunc assert_equal '2', %q{ def foo Integer.sqrt(4, *[]) @@ -3594,3 +3594,14 @@ assert_equal '2', %q{ foo foo } + +# Test non-empty splat with cfunc +assert_equal 'Hello World', %q{ + def bar + args = ["Hello "] + greeting = "World" + greeting.insert(0, *args) + greeting + end + bar +} |