ruby-changes:68354
From: David <ko1@a...>
Date: Sun, 10 Oct 2021 23:12:19 +0900 (JST)
Subject: [ruby-changes:68354] 59c24f054e (master): [ruby/rubygems] Simplify `File.expand_path` usage
https://git.ruby-lang.org/ruby.git/commit/?id=59c24f054e From 59c24f054e6cc6fa08136435d7382739f73ec699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Fri, 1 Oct 2021 16:14:33 +0200 Subject: [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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/package.rb#L468 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 + '/' -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/