From f8ccad729d12fe94ff81bda0e1887a2b4ae4fe72 Mon Sep 17 00:00:00 2001 From: John Mair Date: Sun, 13 Mar 2011 02:26:15 +1300 Subject: [PATCH] removed __FILE__ and __LINE__ from target.eval() in pry_instance.rb, so that we can recognize eval methods (by
and (eval)) --- lib/pry/pry_instance.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 07456097..acefb570 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -136,7 +136,9 @@ class Pry end # eval the expression and save to last_result - Pry.last_result = target.eval r(target), __FILE__, __LINE__ + # Do not want __FILE__, __LINE__ here because we need to distinguish + # (eval) methods for show-method and friends. + Pry.last_result = target.eval r(target) # save the pry instance to active_instance Pry.active_instance = self