aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/remote_fetcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r--lib/rubygems/remote_fetcher.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index a2d8ba45e3..da4db724a1 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -328,20 +328,7 @@ class Gem::RemoteFetcher
end
if update and path
- begin
- open(path, 'wb') do |io|
- io.flock(File::LOCK_EX)
- io.write data
- end
- rescue Errno::ENOLCK # NFS
- if Thread.main != Thread.current
- raise
- else
- open(path, 'wb') do |io|
- io.write data
- end
- end
- end
+ Gem.write_binary(path, data)
end
data
@@ -427,4 +414,3 @@ class Gem::RemoteFetcher
end
end
end
-