class SyntaxTree::YARV::SetConstant


~~~
Constant = 1
~~~ruby
### Usage
constant to and the constant base to set it in.
‘setconstant` pops two values off the stack: the value to set the
### Summary

def ==(other)

def ==(other)
  other.is_a?(SetConstant) && other.name == name
end

def call(vm)

def call(vm)
  value, parent = vm.pop(2)
  parent.const_set(name, value)
end

def deconstruct_keys(_keys)

def deconstruct_keys(_keys)
  { name: name }
end

def disasm(fmt)

def disasm(fmt)
  fmt.instruction("setconstant", [fmt.object(name)])
end

def initialize(name)

def initialize(name)
  @name = name
end

def length

def length
  2
end

def pops

def pops
  2
end

def to_a(_iseq)

def to_a(_iseq)
  [:setconstant, name]
end