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

set_file_and_dir(): now takes optional _pry_ and target args

This commit is contained in:
John Mair 2013-01-06 21:43:41 +01:00
parent 470c938210
commit d77bfe285c

View file

@ -47,7 +47,7 @@ class Pry
end
end
def set_file_and_dir_locals(file_name)
def set_file_and_dir_locals(file_name, _pry_=_pry_(), target=target())
return if !target or !file_name
_pry_.last_file = File.expand_path(file_name)
_pry_.inject_local("_file_", _pry_.last_file, target)