removed __FILE__ and __LINE__ from target.eval() in pry_instance.rb,

so that we can recognize eval methods (by <main> and (eval))
This commit is contained in:
John Mair 2011-03-13 02:26:15 +13:00
parent c343f9c014
commit f8ccad729d
1 changed files with 3 additions and 1 deletions

View File

@ -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