diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-11-04 13:20:42 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-11-18 04:37:25 +0900 |
commit | 81eba77fc0b2954ebf51a228f7bb94f64dd81f75 (patch) | |
tree | 1149a3ad977911bb4986b5555e216bca73688b87 /lib/rubygems | |
parent | 61f023f03b7571c0190f62a6bf811a64f61b118e (diff) |
[rubygems/rubygems] We can now use standard memoization
https://github.com/rubygems/rubygems/commit/231be44d38
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/specification.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index a4dba9699e..f6c29b262b 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -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: |