Cache Gem.default_dir
RubyGems do internally the same \[[1]\]. This should help with: 1) Performance (not tested) 2) Running RubyGems test suite (main motivation), which actually overrides the `@default_dir` \[[2]\] to be able to place test content into dedicated directory. [1]:f8e87eba76/lib/rubygems/defaults.rb (L38)
[2]:f8e87eba76/test/rubygems/helper.rb (L372)
This commit is contained in:
parent
d432c95c15
commit
5fd12c42e7
@ -113,7 +113,7 @@ module Gem
|
|||||||
# RubyGems default overrides.
|
# RubyGems default overrides.
|
||||||
|
|
||||||
def default_dir
|
def default_dir
|
||||||
Gem.default_dirs[:system][:gem_dir]
|
@default_dir ||= Gem.default_dirs[:system][:gem_dir]
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_path
|
def default_path
|
||||||
|
Loading…
Reference in New Issue
Block a user