From ec5bde1a8034608939ee649ca8ad4c39f9f52956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 11 Jan 2022 19:53:41 +0100 Subject: [PATCH] [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 --- lib/rubygems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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