Permalink
Browse files

Merge pull request #873 from pritchie/master

check for directory? in WeirdMethodLocator#valid_file?
  • Loading branch information...
2 parents 8a6fdfe + e7d8eb5 commit 2828e77c06bc097b2edcf034fd84e7586c211f56 @banister banister committed Mar 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/pry/method/weird_method_locator.rb
@@ -164,7 +164,7 @@ def index_to_line_number(index)
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)

0 comments on commit 2828e77

Please sign in to comment.