1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

_line_ should not be set by whereami.

Due to a small misunderstanding _line_ was set when really only _dir_ and _file_
had to be set when the user would call `whereami`.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
This commit is contained in:
Yorick Peterse 2012-05-17 11:43:02 +02:00
parent 6b2454bde3
commit 65f521f2e1
2 changed files with 0 additions and 3 deletions

View file

@ -49,7 +49,6 @@ class Pry
if !code.empty?
set_file_and_dir_locals(file)
_pry_.inject_local('_line_', start, target)
output.puts "\n#{text.bold('From:')} #{file} @ line #{start} #{desc}:\n\n"
output.puts code.with_line_numbers.with_marker(marker)

View file

@ -62,8 +62,6 @@ describe "Pry::DefaultCommands::Context" do
def blimey!
mock_pry(binding, 'whereami', '_file_') \
.should =~ /#{File.expand_path(__FILE__)}/
mock_pry(binding, 'whereami', '_line_').should =~ /#{__LINE__}/
end
end