vondruch / rpms / ruby

Forked from rpms/ruby 6 years ago
Clone

5fd12c4 Cache `Gem.default_dir`

Authored and Committed by vondruch 6 months ago
    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]: https://github.com/rubygems/rubygems/blob/f8e87eba76526d2609d543eb7774711d345edc61/lib/rubygems/defaults.rb#L38
    [2]: https://github.com/rubygems/rubygems/blob/f8e87eba76526d2609d543eb7774711d345edc61/test/rubygems/helper.rb#L372
    
        
file modified
+1 -1