lib/bundler.rb in bundler-2.4.18 vs lib/bundler.rb in bundler-2.4.19

- old
+ new

@@ -522,10 +522,10 @@ @gemspec_cache ||= {} key = File.expand_path(file) @gemspec_cache[key] ||= load_gemspec_uncached(file, validate) # Protect against caching side-effected gemspecs by returning a # new instance each time. - @gemspec_cache[key].dup if @gemspec_cache[key] + @gemspec_cache[key]&.dup end def load_gemspec_uncached(file, validate = false) path = Pathname.new(file) contents = read_file(file)