diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-10-01 16:14:33 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-10-10 23:12:10 +0900 |
commit | 59c24f054e6cc6fa08136435d7382739f73ec699 (patch) | |
tree | 9a96703e7c63908952e2c217a85ae751faee8927 /lib | |
parent | 11720818f68181cee38590d8c69a9003393f2363 (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.rb | 2 |
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 + '/' |