summaryrefslogtreecommitdiff
path: root/lib/bundler/shared_helpers.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2018-07-09 21:16:18 -0700
committerAndre Arko <andre@arko.net>2018-07-09 21:16:18 -0700
commitb91dd5da08d2e92378e169fe7ebeff20b26b01db (patch)
tree7ee09be7993e87e4e3a5bc75ad19c92eec4702d0 /lib/bundler/shared_helpers.rb
parent736c583936aa0a2f4fd70be4d8bb7208ce3fdd2d (diff)
downloadbundler-b91dd5da08d2e92378e169fe7ebeff20b26b01db.tar.gz
prevent explosions on Ruby 1.8
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r--lib/bundler/shared_helpers.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 08c6bed212..e4cbbba2ba 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -344,7 +344,11 @@ module Bundler
def resolve_path(path)
expanded = File.expand_path(path)
- expanded = File.realpath(expanded) until expanded == File.realpath(expanded)
+
+ if File.respond_to?(:realpath)
+ expanded = File.realpath(expanded) until expanded == File.realpath(expanded)
+ end
+
expanded
end