summaryrefslogtreecommitdiff
path: root/lib/rubygems/package.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/package.rb')
-rw-r--r--lib/rubygems/package.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb
index 7e2458c3b6..1a064e12a6 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -368,6 +368,9 @@ EOM
raise Gem::Package::PathError.new(filename, destination_dir) if
filename.start_with? '/'
+ destination_dir = File.realpath destination_dir if
+ File.respond_to? :realpath
+
destination = File.join destination_dir, filename
destination = File.expand_path destination