[rubygems/rubygems] Scope rescuing Errno::ENOLCK to just File.open

https://github.com/rubygems/rubygems/commit/2a9d347d29
This commit is contained in:
David Rodríguez 2024-07-02 21:45:00 +02:00 committed by Hiroshi SHIBATA
parent 7cf7e7e2c0
commit da12d63431

View File

@ -813,12 +813,12 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
rescue Errno::ENOSYS, Errno::ENOTSUP
end
yield io
end
rescue Errno::ENOLCK # NFS
if Thread.main != Thread.current
raise
else
open_file_without_flock(path, flags, &block)
rescue Errno::ENOLCK # NFS
if Thread.main != Thread.current
raise
else
open_file_without_flock(path, flags, &block)
end
end
end