class SyntaxTree::YARV::OptAset
### Summary
‘opt_aset` is an instruction for setting the hash value by the key in the `recv = set` format. It is a specialization of the `opt_send_without_block` instruction. It pops the receiver, the key, and the value off the stack and pushes on the result.
### Usage
Attributes
Public Class Methods
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2895 def initialize(calldata) @calldata = calldata end
Public Instance Methods
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2911 def ==(other) other.is_a?(OptAset) && other.calldata == calldata end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2931 def call(vm) canonical.call(vm) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2927 def canonical Send.new(calldata, nil) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2907 def deconstruct_keys(_keys) { calldata: calldata } end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2899 def disasm(fmt) fmt.instruction("opt_aset", [fmt.calldata(calldata)]) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 2903 def to_a(_iseq) [:opt_aset, calldata.to_h] end