class SyntaxTree::YARV::BranchUnless
~~~
end
puts “foo”
if 2 + 3
~~~ruby
### Usage
to the jump index and continues executing there.
If the value popped off the stack is false or nil, ‘branchunless` jumps
the stack: the jump condition.
`branchunless` has one argument: the jump index. It pops one value off
### Summary
def ==(other)
def ==(other) other.is_a?(BranchUnless) && other.label == label end
def branch_targets
def branch_targets [label] end
def call(vm)
def call(vm) vm.jump(label) unless vm.pop end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { label: label } end
def disasm(fmt)
def disasm(fmt) fmt.instruction("branchunless", [fmt.label(label)]) end
def falls_through?
def falls_through? true end
def initialize(label)
def initialize(label) @label = label end
def length
def length 2 end
def pops
def pops 1 end
def to_a(_iseq)
def to_a(_iseq) [:branchunless, label.name] end