1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/rubygems] Simplify File.expand_path usage

https://github.com/rubygems/rubygems/commit/02e3cf44bf
This commit is contained in:
David Rodríguez 2021-10-01 16:14:33 +02:00 committed by git
parent 11720818f6
commit 59c24f054e

View file

@ -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 + '/'