class CodeTools::AST::BlockPass

Attributes

body[RW]

Public Class Methods

new(line, body) click to toggle source
# File lib/rubinius/code/ast/sends.rb, line 396
def initialize(line, body)
  @line = line
  @body = body
end

Public Instance Methods

assignment_bytecode(g) click to toggle source
# File lib/rubinius/code/ast/sends.rb, line 420
def assignment_bytecode(g)
  g.push_proc
  @body.bytecode(g)
end
bytecode(g) click to toggle source
# File lib/rubinius/code/ast/sends.rb, line 415
def bytecode(g)
  @body.bytecode(g)
  convert(g)
end
convert(g) click to toggle source
# File lib/rubinius/code/ast/sends.rb, line 401
def convert(g)
  nil_block = g.new_label
  g.dup
  g.goto_if_nil nil_block

  g.push_cpath_top
  g.find_const :Proc

  g.swap
  g.send :__from_block__, 1

  nil_block.set!
end
to_sexp() click to toggle source
# File lib/rubinius/code/ast/sends.rb, line 425
def to_sexp
  [:block_pass, @body.to_sexp]
end