MJIT: Fix JIT code for multiple values in a single case

[Bug #19263]
This commit is contained in:
Takashi Kokubun 2022-12-25 22:48:35 -08:00
parent 39a96b4344
commit fc03ba50f1
2 changed files with 11 additions and 1 deletions

View file

@ -536,7 +536,7 @@ class RubyVM::MJIT::Compiler # :nodoc: all
when /\A\s+JUMP\((?<dest>[^)]+)\);\s+\z/
dest = Regexp.last_match[:dest]
if insn.name == :opt_case_dispatch # special case... TODO: use another macro to avoid checking name
hash_offsets = C.rb_hash_values(operands[0])
hash_offsets = C.rb_hash_values(operands[0]).uniq
else_offset = cast_offset(operands[1])
base_pos = pos + insn_len