diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-06 02:58:35 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-06 02:58:35 +0000 |
commit | 7112c6a1c15b26eebf0c020dfee7abd30eebde2d (patch) | |
tree | 16e0369e6aa7aee5bbbf79ba3d5ceacb53084534 /lib/rubygems.rb | |
parent | eb537609ba0de060c6633dc3e7dd9ba5e85c6d1b (diff) |
Merge RubyGems-2.7.5 from upstream.
Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 0475ced164..f368226d47 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -10,7 +10,7 @@ require 'rbconfig' require 'thread' module Gem - VERSION = "2.7.3" + VERSION = "2.7.5" end # Must be first since it unloads the prelude from 1.9.2 @@ -161,7 +161,7 @@ module Gem # these are defined in Ruby 1.8.7, hence the need for this convoluted setup. READ_BINARY_ERRORS = begin - read_binary_errors = [Errno::EACCES, Errno::EROFS] + read_binary_errors = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS] read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) read_binary_errors end.freeze @@ -171,7 +171,7 @@ module Gem # these are defined in Ruby 1.8.7. WRITE_BINARY_ERRORS = begin - write_binary_errors = [] + write_binary_errors = [Errno::ENOSYS] write_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) write_binary_errors end.freeze @@ -871,19 +871,19 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} # Safely read a file in binary mode on all platforms. def self.read_binary(path) - open path, 'rb+' do |f| + File.open path, 'rb+' do |f| f.flock(File::LOCK_EX) f.read end rescue *READ_BINARY_ERRORS - open path, 'rb' do |f| + File.open path, 'rb' do |f| f.read end rescue Errno::ENOLCK # NFS if Thread.main != Thread.current raise else - open path, 'rb' do |f| + File.open path, 'rb' do |f| f.read end end |