summaryrefslogtreecommitdiff
path: root/lib/rubygems/package.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-04-15 12:47:18 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-04-15 15:36:15 +0900
commit96741765d880b700933526a97a67345dfcd90c47 (patch)
tree565766c43e97b7deb93f2390af955465a85ee668 /lib/rubygems/package.rb
parented149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 (diff)
Merge the master branch of RubyGems
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4383
Diffstat (limited to 'lib/rubygems/package.rb')
-rw-r--r--lib/rubygems/package.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb
index 0587cd212b..a4ae3e9ea5 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -252,14 +252,7 @@ class Gem::Package
stat = File.lstat file
if stat.symlink?
- target_path = File.readlink(file)
-
- unless target_path.start_with? '.'
- relative_dir = File.dirname(file).sub("#{Dir.pwd}/", '')
- target_path = File.join(relative_dir, target_path)
- end
-
- tar.add_symlink file, target_path, stat.mode
+ tar.add_symlink file, File.readlink(file), stat.mode
end
next unless stat.file?