From 4a8de3fa8872ed43b33f1ae81ae4767f4334283a Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 18 Mar 2023 21:39:24 -0700 Subject: [PATCH] RJIT: Fix toregexp --- lib/ruby_vm/rjit/insn_compiler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb index 03b33e9971..ba645d2374 100644 --- a/lib/ruby_vm/rjit/insn_compiler.rb +++ b/lib/ruby_vm/rjit/insn_compiler.rb @@ -44,7 +44,7 @@ module RubyVM::RJIT when :putstring then putstring(jit, ctx, asm) when :concatstrings then concatstrings(jit, ctx, asm) when :anytostring then anytostring(jit, ctx, asm) - # toregexp + when :toregexp then toregexp(jit, ctx, asm) # intern when :newarray then newarray(jit, ctx, asm) # newarraykwsplat @@ -807,7 +807,7 @@ module RubyVM::RJIT asm.push(C_RET) asm.push(C_RET) # Alignment - asm.mov(C_ARGS[0], ary) + asm.mov(C_ARGS[0], C_RET) asm.mov(C_ARGS[1], opt) asm.call(C.rb_reg_new_ary)