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:
parent
61f023f03b
commit
81eba77fc0
1 changed files with 1 additions and 4 deletions
|
@ -749,10 +749,7 @@ class Gem::Specification < Gem::BasicSpecification
|
||||||
attr_accessor :specification_version
|
attr_accessor :specification_version
|
||||||
|
|
||||||
def self._all # :nodoc:
|
def self._all # :nodoc:
|
||||||
unless @@all
|
@@all ||= Gem.loaded_specs.values | stubs.map(&:to_spec)
|
||||||
@@all = Gem.loaded_specs.values | stubs.map(&:to_spec)
|
|
||||||
end
|
|
||||||
@@all
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self._clear_load_cache # :nodoc:
|
def self._clear_load_cache # :nodoc:
|
||||||
|
|
Loading…
Reference in a new issue