summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-01-11 19:53:41 +0100
committergit <svn-admin@ruby-lang.org>2022-01-20 06:45:27 +0900
commitec5bde1a8034608939ee649ca8ad4c39f9f52956 (patch)
treeaf2e6370a8c3de4c5fd0b0f4bfb23005319e3028 /lib
parent71bc99900914ef3bc3800a22d9221f5acf528082 (diff)
[rubygems/rubygems] Restrict `flock` to Windows
It was introduced to fix some race conditions there, but it doesn't seem necessary on other systems and it's actually causing issues there. https://github.com/rubygems/rubygems/commit/27b682c812
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index c568981e52..2278126020 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -781,7 +781,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
def self.open_with_flock(path, flags, &block)
File.open(path, flags) do |io|
- if !java_platform? && !solaris_platform?
+ if !java_platform? && win_platform?
begin
io.flock(File::LOCK_EX)
rescue Errno::ENOSYS, Errno::ENOTSUP