From 5bf8db9523b6b9d840ceaf235aeed7768c5fff90 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Sun, 17 Feb 2013 23:21:54 -0800 Subject: [PATCH] Don't warn if .pryrc doesn't exist on rbx in 1.9 mode --- lib/pry/pry_class.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 19af3819..24648af2 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -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