commit 0a76e13645e990c48491c4c555fe9f7adcc1e552 Author: Ryan Davis Date: Sat Feb 7 05:41:57 2015 -0800 - Fixed potential perms issue unpacking of gems on NFS. Fixes #1161 diff --git lib/rubygems/package.rb lib/rubygems/package.rb index 417b34b..e8b8b38 100644 --- lib/rubygems/package.rb +++ lib/rubygems/package.rb @@ -366,8 +366,9 @@ EOM FileUtils.mkdir_p mkdir, mkdir_options - open destination, 'wb', entry.header.mode do |out| + open destination, 'wb' do |out| out.write entry.read + FileUtils.chmod entry.header.mode, destination end if entry.file? verbose destination