class CodeTools::AST::BlockGiven

Handles block_given?

Public Class Methods

match?(line, receiver, name, arguments, privately) click to toggle source
# File lib/rubinius/code/ast/transforms.rb, line 36
def self.match?(line, receiver, name, arguments, privately)
  if receiver.kind_of? Self and (name == :block_given? or name == :iterator?)
    new line, receiver, name, privately
  end
end

Public Instance Methods

bytecode(g) click to toggle source
# File lib/rubinius/code/ast/transforms.rb, line 42
def bytecode(g)
  pos(g)
  g.push_has_block
end