class SyntaxTree::YARV::OptSendWithoutBlock
### Summary
‘opt_send_without_block` is a specialization of the send instruction that occurs when a method is being called without a block. It pops the receiver and the arguments off the stack and pushes on the result.
### Usage
~~~ruby puts “Hello, world!” ~~~
Attributes
calldata[R]
Public Class Methods
new(calldata)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4174 def initialize(calldata) @calldata = calldata end
Public Instance Methods
==(other)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4190 def ==(other) other.is_a?(OptSendWithoutBlock) && other.calldata == calldata end
call(vm)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4210 def call(vm) canonical.call(vm) end
canonical()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4206 def canonical Send.new(calldata, nil) end
deconstruct_keys(_keys)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4186 def deconstruct_keys(_keys) { calldata: calldata } end
disasm(fmt)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4178 def disasm(fmt) fmt.instruction("opt_send_without_block", [fmt.calldata(calldata)]) end
length()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4194 def length 2 end
pops()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4198 def pops 1 + calldata.argc end
pushes()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4202 def pushes 1 end
to_a(_iseq)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4182 def to_a(_iseq) [:opt_send_without_block, calldata.to_h] end