Permalink
Browse files

check for directory? in WeirdMethodLocator#valid_file? prevents crash…

… under jruby
  • Loading branch information...
1 parent 8a6fdfe commit e7d8eb556c7c534e97e4d2349212303d531c2638 @pritchie pritchie 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 e7d8eb5

Please sign in to comment.