summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2022-12-27 14:56:51 +0900
committerNARUSE, Yui <naruse@airemix.jp>2022-12-27 14:56:51 +0900
commit5c551ac59f9620901394a46dffda5a1833b9c4b0 (patch)
tree9f27c050807ecbfd87264bef9a1214f2fb36a748 /lib/ruby_vm/mjit
parenta528908271c678360d2d8ca232c178e7cdd340b4 (diff)
merge revision(s) fc03ba50f1ff6c30f7c654f564b4dffbed0844ef: [Backport #19263]
MJIT: Fix JIT code for multiple values in a single case [Bug #19263] --- lib/ruby_vm/mjit/compiler.rb | 2 +- test/ruby/test_mjit.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
Diffstat (limited to 'lib/ruby_vm/mjit')
-rw-r--r--lib/ruby_vm/mjit/compiler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ruby_vm/mjit/compiler.rb b/lib/ruby_vm/mjit/compiler.rb
index 3ef3babf66..a9f2aeda8d 100644
--- a/lib/ruby_vm/mjit/compiler.rb
+++ b/lib/ruby_vm/mjit/compiler.rb
@@ -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