Don't warn if .pryrc doesn't exist on rbx in 1.9 mode

This commit is contained in:
Conrad Irwin 2013-02-17 23:21:54 -08:00
parent 78caffbcbc
commit 5bf8db9523
1 changed files with 3 additions and 1 deletions

View File

@ -92,7 +92,9 @@ class Pry
# Expand a file to its canonical name (following symlinks as appropriate)
def self.real_path_to(file)
Pathname.new(File.expand_path(file)).realpath.to_s
expanded = Pathname.new(File.expand_path(file)).realpath.to_s
# For rbx 1.9 mode [see rubinius issue #2165]
File.exist?(expanded) ? expanded : nil
rescue Errno::ENOENT
nil
end