check for directory? in WeirdMethodLocator#valid_file? prevents crash under jruby

This commit is contained in:
Patrick Ritchie 2013-03-05 11:27:45 -05:00
parent 8a6fdfe728
commit e7d8eb556c
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ class Pry
end
def valid_file?(file)
File.exists?(file) || Pry.eval_path == file
(File.exists?(file) && !File.directory?(file)) || Pry.eval_path == file
end
def lines_for_file(file)