class SyntaxTree::YARV::Legacy::SetClassVariable
~~~
@@class_variable = 1
~~~ruby
### Usage
since in Ruby 3.0 it gained an inline cache.
This version of the ‘setclassvariable` instruction is no longer used
sets its value to the value it pops off the top of the stack.
`setclassvariable` looks for a class variable in the current class and
### Summary
def ==(other)
def ==(other) other.is_a?(SetClassVariable) && other.name == name end
def call(vm)
def call(vm) canonical.call(vm) end
def canonical
def canonical YARV::SetClassVariable.new(name, nil) end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { name: name } end
def disasm(fmt)
def disasm(fmt) fmt.instruction("setclassvariable", [fmt.object(name)]) end
def initialize(name)
def initialize(name) @name = name end
def length
def length 2 end
def pops
def pops 1 end
def to_a(_iseq)
def to_a(_iseq) [:setclassvariable, name] end