diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-19 08:27:04 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-19 08:27:04 +0000 |
commit | 90df7a08e41dba0e529eea8675f86ccdf6502597 (patch) | |
tree | 511b5dd540ce065fc379c6b2382420e9cf90f036 /lib/rubygems.rb | |
parent | 6d6880ff40d96a139fff156a7674b87978d321dc (diff) |
merge revision(s) 62244,62246,62301,62302,62303,62422,62436,62452: [Backport #14481]
Merge RubyGems-2.7.5 from upstream.
Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html
test_gem_util.rb: fix broken test
* test/rubygems/test_gem_util.rb: no guarantee that tmpdir is
always underneath the root directory at all.
test_gem_commands_setup_command.rb: BUNDLER_VERS
* test/rubygems/test_gem_commands_setup_command.rb: run bundled
gem command, instead of installed one.
no need to set bundled bundler unless Gem::USE_BUNDLER_FOR_GEMDEPS
revert r62302 and force to define the version constant
Merge RubyGems 2.7.6 from upstream.
It fixed some security vulnerabilities.
http://blog.rubygems.org/2018/02/15/2.7.6-released.html
fix regexp literal warning.
test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
[Bug #14481]
Remove unnecessary `[]`s
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@62837 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..2762bfcb88 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.6" 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 |