# File lib/monkey.rb, line 40
  def self.delete_from_backtrace(error, &block)
    if error.respond_to? :awesome_backtrace
      # HACK: we rely on the internal data structure, btw
      locations = error.instance_variable_get :@locations
      return unless locations
      locations.reject! { |l| yield l.position }
      error.instance_variable_set :@backtrace, nil
    else
      error.backtrace.reject!(&block)
    end
  end