[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
This commit is contained in:
David Rodríguez 2022-01-11 19:53:41 +01:00 коммит произвёл git
Родитель 71bc999009
Коммит ec5bde1a80
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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