1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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 committed by git
parent 71bc999009
commit ec5bde1a80

View file

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