diff options
author | Jimmy Miller <jimmy.miller@shopify.com> | 2023-04-17 17:58:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 17:58:04 -0400 |
commit | 293913905e87c799c00c113900814987dce994e7 (patch) | |
tree | 4506f4fd956df75d388958cf4ecc7be463e8fcab /bootstraptest | |
parent | 5aa3be65f4e003f3638258cdd6e10aabd9d05d2d (diff) |
YJIT: Fixes failure reported by rails for opt+splat+rest (#7727)
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 14 |
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 +} |