class SyntaxTree::YARV::ConcatArray
~~~
[1, *2]
~~~ruby
### Usage
it was already an Array, to avoid mutating it when concatenating.
calling ‘to_a` if necessary, and makes sure to `dup` the first Array if
It coerces the two objects at the top of the stack into Arrays by
`concatarray` concatenates the two Arrays on top of the stack.
### Summary
def ==(other)
def ==(other) other.is_a?(ConcatArray) end
def call(vm)
def call(vm) left, right = vm.pop(2) vm.push([*left, *right]) end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) {} end
def disasm(fmt)
def disasm(fmt) fmt.instruction("concatarray") end
def pops
def pops 2 end
def pushes
def pushes 1 end
def to_a(_iseq)
def to_a(_iseq) [:concatarray] end