From e0a28bb5f885bd433d58ab80817264fcf4f517fb Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 13 Apr 2012 22:15:50 -0700 Subject: [PATCH] Show => on whereami with methods --- lib/pry/default_commands/context.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry/default_commands/context.rb b/lib/pry/default_commands/context.rb index d23bd7fb..61dfa1b7 100644 --- a/lib/pry/default_commands/context.rb +++ b/lib/pry/default_commands/context.rb @@ -25,7 +25,7 @@ class Pry file = @method.source_file start = @method.source_range.begin finish = @method.source_range.end - 1 - marker = binding.eval("__LINE__") + marker = target.eval("__LINE__") else file = target.eval("__FILE__") start = target.eval("__LINE__") @@ -46,7 +46,7 @@ class Pry end desc = (@method && @method.name_with_owner) || "" - + if !code.empty? output.puts "\n#{text.bold('From:')} #{file} @ line #{start}#{desc}:\n\n" output.puts code.with_line_numbers.with_marker(marker)