diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index d7dd0cd460..8902cd6cde 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -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) +} diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 0afed2effa..31582c26bc 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -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;