diff options
author | Alan Wu <[email protected]> | 2024-01-18 19:53:28 -0500 |
---|---|---|
committer | Alan Wu <[email protected]> | 2024-01-18 20:22:40 -0500 |
commit | 7b253cfea4212bc97a37514b9ffa8405de04748c (patch) | |
tree | 9a543a1d917ff7f64cb72e1dbe2c3560ed858d24 /lib/ruby_vm/rjit | |
parent | bbd249e351af7e4929b518a5de73a832b5617273 (diff) |
RJIT: Properly reject keyword splat with `yield`
See the fix for YJIT.
Diffstat (limited to 'lib/ruby_vm/rjit')
-rw-r--r-- | lib/ruby_vm/rjit/insn_compiler.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb index 6440944944..b1f031a9ae 100644 --- a/lib/ruby_vm/rjit/insn_compiler.rb +++ b/lib/ruby_vm/rjit/insn_compiler.rb @@ -4452,6 +4452,11 @@ module RubyVM::RJIT return CantCompile end + if flags & C::VM_CALL_KW_SPLAT != 0 + asm.incr_counter(:send_iseq_kw_splat) + return CantCompile + end + if iseq_has_rest && opt_num != 0 asm.incr_counter(:send_iseq_has_rest_and_optional) return CantCompile |