From 293913905e87c799c00c113900814987dce994e7 Mon Sep 17 00:00:00 2001 From: Jimmy Miller Date: Mon, 17 Apr 2023 17:58:04 -0400 Subject: YJIT: Fixes failure reported by rails for opt+splat+rest (#7727) --- bootstraptest/test_yjit.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bootstraptest') 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 +} -- cgit v1.2.3