ruby-changes:70938
From: David <ko1@a...>
Date: Thu, 20 Jan 2022 06:45:45 +0900 (JST)
Subject: [ruby-changes:70938] ec5bde1a80 (master): [rubygems/rubygems] Restrict `flock` to Windows
https://git.ruby-lang.org/ruby.git/commit/?id=ec5bde1a80 From ec5bde1a8034608939ee649ca8ad4c39f9f52956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Tue, 11 Jan 2022 19:53:41 +0100 Subject: [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 c568981e52d..22781260206 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -781,7 +781,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L781 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/