diff --git a/lib/pry/method/weird_method_locator.rb b/lib/pry/method/weird_method_locator.rb index b64b710f..a668d16d 100644 --- a/lib/pry/method/weird_method_locator.rb +++ b/lib/pry/method/weird_method_locator.rb @@ -164,7 +164,7 @@ class Pry end def valid_file?(file) - (File.exists?(file) && !File.directory?(file)) || Pry.eval_path == file + (File.exist?(file) && !File.directory?(file)) || Pry.eval_path == file end def lines_for_file(file)