diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-10 04:31:08 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-10 04:31:08 +0000 |
commit | c659f4044671e55f833d0b308b90b75274f0d805 (patch) | |
tree | 6b9d0e5012e36c706bc8ec15a638fcc011206e2d /lib/rubygems.rb | |
parent | 020bd635acc3f2f2c53ea1e55f0e6005677367c5 (diff) |
Revert r28200.
It caused many failures on test-all and following is SEGV.
./ruby -e 'require %!#{"foo/" * 10000}foo!'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 1dee815a15..d2e0f2cb5d 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -1020,6 +1020,8 @@ end module Kernel + undef gem if respond_to? :gem # defined in gem_prelude.rb on 1.9 + ## # Use Kernel#gem to activate a specific version of +gem_name+. # @@ -1096,34 +1098,13 @@ end require 'rubygems/config_file' -class << Gem - verbose, debug = $VERBOSE, $DEBUG - $VERBOSE = $DEBUG = nil - - ## - # - # Called from the custom_require to attempt to activate +path+ - # Internal use only. - - def try_activate(path) # :doc: - spec = Gem.searcher.find(path) - return false unless spec - - Gem.activate(spec.name, "= #{spec.version}") - return true - end - -ensure - $VERBOSE, $DEBUG = verbose, debug -end - ## # Enables the require hook for RubyGems. # # Ruby 1.9 allows --disable-gems, so we require it when we didn't detect a Gem # constant at rubygems.rb load time. -require 'rubygems/custom_require' +require 'rubygems/custom_require' if gem_disabled or RUBY_VERSION < '1.9' Gem.clear_paths |