Show => on whereami with methods

This commit is contained in:
Conrad Irwin 2012-04-13 22:15:50 -07:00
parent e4d1169afa
commit e0a28bb5f8
1 changed files with 2 additions and 2 deletions

View File

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