Class: CodeTools::AST::SplatWrapped

Inherits:
SplatAssignment show all
Defined in:
lib/rubinius/code/ast/variables.rb

Instance Attribute Summary

Attributes inherited from SplatAssignment

#value

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from SplatAssignment

#initialize

Methods inherited from Node

#ascii_graph, #attributes, #children, #defined, #initialize, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk

Constructor Details

This class inherits a constructor from CodeTools::AST::SplatAssignment

Instance Method Details

#bytecode(g) ⇒ Object



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/rubinius/code/ast/variables.rb', line 382

def bytecode(g)
  pos(g)

  assign = g.new_label

  g.dup
  g.push_cpath_top
  g.find_const :Array
  g.swap
  g.kind_of
  g.goto_if_true assign
  g.make_array 1

  assign.set!
  @value.bytecode(g)
end

#to_sexpObject



399
400
401
# File 'lib/rubinius/code/ast/variables.rb', line 399

def to_sexp
  @value.to_sexp
end