class CodeTools::AST::LocalVariableAssignment

Public Class Methods

new(line, name, value=nil) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 502
def initialize(line, name, value=nil)
  @line = line
  @name = name
  @value = value
  @variable = nil
end

Public Instance Methods

bytecode(g) click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 509
def bytecode(g)
  unless @variable
    g.state.scope.assign_local_reference self
  end

  if @value
    @value.bytecode(g)
  end

  # Set the position after the value, so the position
  # reflects where the assignment itself is done
  pos(g)

  @variable.set_bytecode(g)
end
sexp_name() click to toggle source
# File lib/rubinius/code/ast/variables.rb, line 525
def sexp_name
  :lasgn
end