class SyntaxTree::YARV::OptNot
### Summary
‘opt_not` negates the value on top of the stack by calling the `!` method on it. It pops the receiver off the stack and pushes on the result.
### Usage
~~~ruby !true ~~~
Attributes
Public Class Methods
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4001 def initialize(calldata) @calldata = calldata end
Public Instance Methods
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4017 def ==(other) other.is_a?(OptNot) && other.calldata == calldata end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4037 def call(vm) canonical.call(vm) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4033 def canonical Send.new(calldata, nil) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4013 def deconstruct_keys(_keys) { calldata: calldata } end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4005 def disasm(fmt) fmt.instruction("opt_not", [fmt.calldata(calldata)]) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 4009 def to_a(_iseq) [:opt_not, calldata.to_h] end