diff options
author | Andre Arko <andre@arko.net> | 2018-07-09 21:16:18 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2018-07-09 21:16:18 -0700 |
commit | b91dd5da08d2e92378e169fe7ebeff20b26b01db (patch) | |
tree | 7ee09be7993e87e4e3a5bc75ad19c92eec4702d0 /lib/bundler/shared_helpers.rb | |
parent | 736c583936aa0a2f4fd70be4d8bb7208ce3fdd2d (diff) | |
download | bundler-b91dd5da08d2e92378e169fe7ebeff20b26b01db.tar.gz |
prevent explosions on Ruby 1.8
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r-- | lib/bundler/shared_helpers.rb | 6 |
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 |