YJIT: Remove exit for rest and send combo (#7546)

This commit is contained in:
Jimmy Miller 2023-03-16 17:40:36 -04:00 committed by GitHub
parent 473009d7cb
commit 5825d7d4a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-03-16 21:40:58 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2 changed files with 8 additions and 5 deletions

View File

@ -3654,3 +3654,11 @@ assert_equal "[]", %q{
test(custom)
EMPTY
}
# Rest with send
assert_equal '[1, 2, 3]', %q{
def bar(x, *rest)
rest.insert(0, x)
end
send(:bar, 1, 2, 3)
}

View File

@ -5382,11 +5382,6 @@ fn gen_send_iseq(
return CantCompile;
}
if iseq_has_rest && flags & VM_CALL_OPT_SEND != 0 {
gen_counter_incr!(asm, send_iseq_has_rest_and_send);
return CantCompile;
}
if iseq_has_rest && unsafe { get_iseq_flags_has_block(iseq) } {
gen_counter_incr!(asm, send_iseq_has_rest_and_block);
return CantCompile;