diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 00:51:04 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 00:51:04 +0000 |
commit | 8fadbe5f3e5e8b2d9f635a274b4121811313de84 (patch) | |
tree | 3dc303b2b09eb4c54d19e3c68172856d13d60e2b /lib/rubygems.rb | |
parent | c2dcb947aaf60421ca4035298059a029a0a24c26 (diff) | |
download | ruby-8fadbe5f3e5e8b2d9f635a274b4121811313de84.tar.gz |
* lib/rubygems: Update to RubyGems master ddac51f. Changes:
* Allow override for the shared gem installation directory for
rubygems packagers.
* Lock gem cache files for read and write to improve thread safety.
* Use io/console when available.
* Minor cleanup.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 732005fb9a..9baee34b2d 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -764,7 +764,10 @@ module Gem # Safely read a file in binary mode on all platforms. def self.read_binary(path) - File.open path, binary_mode do |f| f.read end + File.open path, binary_mode do |f| + f.flock(File::LOCK_EX) + f.read + end end ## @@ -1163,17 +1166,18 @@ module Gem autoload :ConfigFile, 'rubygems/config_file' autoload :Dependency, 'rubygems/dependency' autoload :DependencyList, 'rubygems/dependency_list' - autoload :Resolver, 'rubygems/resolver' autoload :DependencyResolver, 'rubygems/resolver' + autoload :Installer, 'rubygems/installer' autoload :PathSupport, 'rubygems/path_support' autoload :Platform, 'rubygems/platform' autoload :RequestSet, 'rubygems/request_set' autoload :Requirement, 'rubygems/requirement' + autoload :Resolver, 'rubygems/resolver' + autoload :Source, 'rubygems/source' autoload :SourceList, 'rubygems/source_list' autoload :SpecFetcher, 'rubygems/spec_fetcher' autoload :Specification, 'rubygems/specification' autoload :Version, 'rubygems/version' - autoload :Source, 'rubygems/source' require "rubygems/specification" end |