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