summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-10-01 16:14:33 +0200
committergit <svn-admin@ruby-lang.org>2021-10-10 23:12:10 +0900
commit59c24f054e6cc6fa08136435d7382739f73ec699 (patch)
tree9a96703e7c63908952e2c217a85ae751faee8927 /lib
parent11720818f68181cee38590d8c69a9003393f2363 (diff)
[ruby/rubygems] Simplify `File.expand_path` usage
https://github.com/rubygems/rubygems/commit/02e3cf44bf
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/package.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb
index 71f82463f9..6c6278f483 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -468,7 +468,7 @@ EOM
filename.start_with? '/'
destination_dir = File.expand_path(File.realpath(destination_dir))
- destination = File.expand_path(File.join(destination_dir, filename))
+ destination = File.expand_path(filename, destination_dir)
raise Gem::Package::PathError.new(destination, destination_dir) unless
destination.start_with? destination_dir + '/'