brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2021-12-31 18:08:58 +00:00
parent 7f9a7cd50b
commit 20bf4f8473
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
14 changed files with 13 additions and 12 deletions

View File

@ -7,7 +7,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.9
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.8.11/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.15.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.5.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.5.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.4.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-4.0.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.0/lib"

View File

@ -29,7 +29,6 @@ module Kernel
required
else
loader.on_dir_autoloaded(path)
$LOADED_FEATURES << path
true
end
else

View File

@ -123,7 +123,13 @@ module Zeitwerk
# @sig () -> void
def unload
mutex.synchronize do
abspaths_of_unloaded_crefs = Set.new
# We are going to keep track of the files that were required by our
# autoloads to later remove them from $LOADED_FEATURES, thus making them
# loadable by Kernel#require again.
#
# Directories are not stored in $LOADED_FEATURES, keeping track of files
# is enough.
unloaded_files = Set.new
autoloads.each do |abspath, (parent, cname)|
if parent.autoload?(cname)
@ -133,7 +139,7 @@ module Zeitwerk
# and the constant path would escape unloadable_cpath? This is just
# defensive code to clean things up as much as we are able to.
unload_cref(parent, cname)
abspaths_of_unloaded_crefs.add(abspath)
unloaded_files.add(abspath) if ruby?(abspath)
end
end
@ -144,14 +150,10 @@ module Zeitwerk
end
unload_cref(parent, cname)
abspaths_of_unloaded_crefs.add(abspath)
unloaded_files.add(abspath) if ruby?(abspath)
end
unless abspaths_of_unloaded_crefs.empty?
# We remove these abspaths from $LOADED_FEATURES because, otherwise,
# `require`'s idempotence would prevent newly defined autoloads from
# loading them again.
#
unless unloaded_files.empty?
# Bootsnap decorates Kernel#require to speed it up using a cache and
# this optimization does not check if $LOADED_FEATURES has the file.
#
@ -163,7 +165,7 @@ module Zeitwerk
# Rails applications may depend on bootsnap, so for unloading to work
# in that setting it is preferable that we restrict our API choice to
# one of those methods.
$LOADED_FEATURES.reject! { |file| abspaths_of_unloaded_crefs.member?(file) }
$LOADED_FEATURES.reject! { |file| unloaded_files.member?(file) }
end
autoloads.clear

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
module Zeitwerk
VERSION = "2.5.2"
VERSION = "2.5.3"
end