diff options
author | Shannon Skipper <shannonskipper@gmail.com> | 2013-11-23 14:52:21 -0800 |
---|---|---|
committer | Shannon Skipper <shannonskipper@gmail.com> | 2013-11-23 14:52:21 -0800 |
commit | 173bbd02dac2bfd3b8744800bf0e74297fcfc827 (patch) | |
tree | b47fcb3407bb1a05eb0c5808eb525f9461271b8f /lib/pry/code | |
parent | 95110424c630c2436668ddd73a70aa2ba4289759 (diff) | |
download | pry-173bbd02dac2bfd3b8744800bf0e74297fcfc827.tar.gz |
Shorten #readable_source? to #readable?.
Diffstat (limited to 'lib/pry/code')
-rw-r--r-- | lib/pry/code/code_file.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pry/code/code_file.rb b/lib/pry/code/code_file.rb index 618a66a2..c97cb67a 100644 --- a/lib/pry/code/code_file.rb +++ b/lib/pry/code/code_file.rb @@ -58,13 +58,13 @@ class Pry end def find_abs_path(filename) - code_path(filename).detect { |path| readable_source?(path) } + code_path(filename).detect { |path| readable?(path) } end # @param [String] path # @return [Boolean] if the path, with or without the default ext, # is a readable file then `true`, otherwise `false`. - def readable_source?(path) + def readable?(path) File.readable?(path) && !File.directory?(path) or File.readable?(path << DEFAULT_EXT) end |