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

[rubygems/rubygems] We can now use standard memoization

https://github.com/rubygems/rubygems/commit/231be44d38
This commit is contained in:
David Rodríguez 2021-11-04 13:20:42 +01:00 committed by git
parent 61f023f03b
commit 81eba77fc0

View file

@ -749,10 +749,7 @@ class Gem::Specification < Gem::BasicSpecification
attr_accessor :specification_version
def self._all # :nodoc:
unless @@all
@@all = Gem.loaded_specs.values | stubs.map(&:to_spec)
end
@@all
@@all ||= Gem.loaded_specs.values | stubs.map(&:to_spec)
end
def self._clear_load_cache # :nodoc: