1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems: Import RubyGems 2.1.0 Release Candidate

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-08-26 20:24:51 +00:00
parent cddd93a575
commit e487a7f53c
49 changed files with 888 additions and 354 deletions

View file

@ -8,6 +8,8 @@ require 'monitor'
module Kernel
RUBYGEMS_ACTIVATION_MONITOR = Monitor.new # :nodoc:
if defined?(gem_original_require) then
# Ruby ships with a custom_require, override its require
remove_method :require
@ -33,10 +35,8 @@ module Kernel
# The normal <tt>require</tt> functionality of returning false if
# that file has already been loaded is preserved.
ACTIVATION_MONITOR = Monitor.new
def require path
ACTIVATION_MONITOR.enter
RUBYGEMS_ACTIVATION_MONITOR.enter
spec = Gem.find_unresolved_default_spec(path)
if spec
@ -118,7 +118,7 @@ module Kernel
raise load_error
ensure
ACTIVATION_MONITOR.exit
RUBYGEMS_ACTIVATION_MONITOR.exit
end
private :require