Skip to content

Commit

Permalink
* lib/rubygems.rb: Reduce requires to improve make benchmark.
Browse files Browse the repository at this point in the history
	  [ruby#4962]
	* lib/rubygems/specification.rb:  Delay initialization of rubygems
	  until require is called.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
drbrain committed Jul 6, 2011
1 parent c1d84bf commit 0e7da28
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Thu Jul 7 06:19:38 2011 Eric Hodel <[email protected]>

* lib/rubygems.rb: Reduce requires to improve `make benchmark`.
[#4962]
* lib/rubygems/specification.rb: Delay initialization of rubygems
until require is called.

Thu Jul 7 04:31:26 2011 Nobuyoshi Nakada <[email protected]>

* parse.y (arg): rescue_mod is in inverse order from other
8 changes: 3 additions & 5 deletions lib/rubygems.rb
Original file line number Diff line number Diff line change
@@ -32,8 +32,6 @@ class << Gem
end

require 'rubygems/defaults'
require "rubygems/dependency_list"
require 'rubygems/path_support'
require 'rbconfig'
require "rubygems/deprecate"

@@ -126,7 +124,7 @@ class << Gem
# -The RubyGems Team

module Gem
VERSION = '1.8.5'
VERSION = '1.8.5.1'

##
# Raised when RubyGems is unable to load or activate a gem. Contains the
@@ -1142,11 +1140,13 @@ def self.cache # :nodoc:
autoload :Version, 'rubygems/version'
autoload :Requirement, 'rubygems/requirement'
autoload :Dependency, 'rubygems/dependency'
autoload :DependencyList, 'rubygems/dependency_list'
autoload :GemPathSearcher, 'rubygems/gem_path_searcher'
autoload :SpecFetcher, 'rubygems/spec_fetcher'
autoload :Specification, 'rubygems/specification'
autoload :Cache, 'rubygems/source_index'
autoload :SourceIndex, 'rubygems/source_index'
autoload :PathSupport, 'rubygems/path_support'
autoload :Platform, 'rubygems/platform'
autoload :Builder, 'rubygems/builder'
autoload :ConfigFile, 'rubygems/config_file'
@@ -1238,8 +1238,6 @@ def RbConfig.datadir(package_name)

require 'rubygems/custom_require'

Gem.clear_paths

module Gem
class << self
extend Deprecate
3 changes: 3 additions & 0 deletions lib/rubygems/specification.rb
Original file line number Diff line number Diff line change
@@ -2126,3 +2126,6 @@ def yaml_initialize(tag, vals) # :nodoc:
# deprecate :file_name, :cache_file, 2011, 10
# deprecate :full_gem_path, :cache_file, 2011, 10
end

Gem.clear_paths

0 comments on commit 0e7da28

Please sign in to comment.