[前][次][番号順一覧][スレッド一覧]

ruby-changes:68358

From: David <ko1@a...>
Date: Sun, 10 Oct 2021 23:12:42 +0900 (JST)
Subject: [ruby-changes:68358] 6c878731c1 (master): [ruby/rubygems] Remove redundant `File.expand_path`

https://git.ruby-lang.org/ruby.git/commit/?id=6c878731c1

From 6c878731c1b0de974e071d532e7708e1a1ce9d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 1 Oct 2021 16:16:32 +0200
Subject: [ruby/rubygems] Remove redundant `File.expand_path`

`File.realpath` already expands paths.

https://github.com/rubygems/rubygems/commit/25524ebbeb
---
 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 6c6278f483..10d9b85bf3 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -467,7 +467,7 @@ EOM https://github.com/ruby/ruby/blob/trunk/lib/rubygems/package.rb#L467
     raise Gem::Package::PathError.new(filename, destination_dir) if
       filename.start_with? '/'
 
-    destination_dir = File.expand_path(File.realpath(destination_dir))
+    destination_dir = File.realpath(destination_dir)
     destination = File.expand_path(filename, destination_dir)
 
     raise Gem::Package::PathError.new(destination, destination_dir) unless
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]