# File lib/pry/pry_instance.rb, line 264 def re(target=TOPLEVEL_BINDING) target = Pry.binding_for(target) # 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_sticky_locals(target) code = r(target) exec_hook :before_eval, code, self 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