aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authorJimmy Miller <jimmy.miller@shopify.com>2023-04-17 17:58:04 -0400
committerGitHub <noreply@github.com>2023-04-17 17:58:04 -0400
commit293913905e87c799c00c113900814987dce994e7 (patch)
tree4506f4fd956df75d388958cf4ecc7be463e8fcab /bootstraptest
parent5aa3be65f4e003f3638258cdd6e10aabd9d05d2d (diff)
downloadruby-293913905e87c799c00c113900814987dce994e7.tar.gz
YJIT: Fixes failure reported by rails for opt+splat+rest (#7727)
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 819d9b9480..69e93cabee 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -3933,3 +3933,17 @@ assert_equal '[true, true, true, true, true]', %q{
end
calling_my_func
}
+
+# Regresssion test: rest and optional and splat
+assert_equal 'true', %q{
+ def my_func(base=nil, *args)
+ [base, args]
+ end
+
+ def calling_my_func
+ array = []
+ my_func(:base, :rest1, *array) == [:base, [:rest1]]
+ end
+
+ calling_my_func
+}