# File lib/pry/pry_instance.rb, line 225
  def re(target=TOPLEVEL_BINDING)
    target = Pry.binding_for(target)

    compl = Pry::InputCompleter.build_completion_proc(target,
                                                      instance_eval(&custom_completions))

    if defined? Coolline and input.is_a? Coolline
      input.completion_proc = proc do |cool|
        compl.call cool.completed_word
      end
    elsif input.respond_to? :completion_proc=
      input.completion_proc = compl
    end

    # It's not actually redundant to inject them continually as we may have
    # moved into the scope of a new Binding (e.g the user typed `cd`)
    inject_special_locals(target)

    code = r(target)

    result = target.eval(code, Pry.eval_path, Pry.current_line)
    set_last_result(result, target, code)

    result
  rescue RescuableException => e
    self.last_exception = e
    e
  ensure
    update_input_history(code)
    exec_hook :after_eval, result, self
  end