lib/bitcoin/script.rb
# If the top stack value is not 0, the statements are executed. The top stack value is removed.
If the top stack value is not 0, the statements are executed. The top stack value is removed.
If the top stack value is not 0 the statements are executed . The top stack value is removed .
def op_if
    value = false
    if @do_exec
      (invalid; return) if @stack.size < 1
      value = cast_to_bool(pop_string) == false ? false : true
    end
    @exec_stack << value
  end
def op_if value = false if @do_exec ( invalid ; return ) if @stack . size < 1 value = cast_to_bool ( pop_string ) == false ? false : true end @exec_stack << value end
If the top stack value is not 0, the statements are executed.
If the top stack value is not 0 the statements are executed .