From 81eba77fc0b2954ebf51a228f7bb94f64dd81f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 4 Nov 2021 13:20:42 +0100 Subject: [PATCH] [rubygems/rubygems] We can now use standard memoization https://github.com/rubygems/rubygems/commit/231be44d38 --- lib/rubygems/specification.rb | 5 +---- 1 file changed, 1 insertion(+), 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: