From 59c24f054e6cc6fa08136435d7382739f73ec699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 1 Oct 2021 16:14:33 +0200 Subject: [PATCH] [ruby/rubygems] Simplify `File.expand_path` usage https://github.com/rubygems/rubygems/commit/02e3cf44bf --- lib/rubygems/package.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + '/'