class CodeTools::AST::ClassVariableAssignment

Public Instance Methods

bytecode(g) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 201
def bytecode(g)
  pos(g)

  if g.state.scope.module?
    g.push_self
  else
    g.push_scope
  end

  if @value
    g.push_literal @name
    @value.bytecode(g)
  else
    g.swap
    g.push_literal @name
    g.swap
  end

  pos(g)
  g.send :class_variable_set, 2
end
sexp_name() click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 223
def sexp_name
  :cvasgn
end