summaryrefslogtreecommitdiff
path: root/lib/ruby_vm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm')
-rw-r--r--lib/ruby_vm/mjit/insn_compiler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb
index ed004c99e9..a4d79127be 100644
--- a/lib/ruby_vm/mjit/insn_compiler.rb
+++ b/lib/ruby_vm/mjit/insn_compiler.rb
@@ -342,8 +342,8 @@ module RubyVM::MJIT
# TODO: skip check for known truthy
# This `test` sets ZF only for Qnil and Qfalse, which let jz jump.
- asm.test([SP, C.VALUE.size * (ctx.stack_size - 1)], ~Qnil)
- ctx.stack_pop(1)
+ val = ctx.stack_pop
+ asm.test(val, ~Qnil)
# Set stubs
branch_stub = BranchStub.new(