brew vendor-gems: commit updates.
This commit is contained in:
parent
7f9a7cd50b
commit
20bf4f8473
@ -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/i18n-1.8.11/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.15.0/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/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/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/public_suffix-4.0.6/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.0/lib"
|
||||||
|
|||||||
@ -29,7 +29,6 @@ module Kernel
|
|||||||
required
|
required
|
||||||
else
|
else
|
||||||
loader.on_dir_autoloaded(path)
|
loader.on_dir_autoloaded(path)
|
||||||
$LOADED_FEATURES << path
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -123,7 +123,13 @@ module Zeitwerk
|
|||||||
# @sig () -> void
|
# @sig () -> void
|
||||||
def unload
|
def unload
|
||||||
mutex.synchronize do
|
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)|
|
autoloads.each do |abspath, (parent, cname)|
|
||||||
if parent.autoload?(cname)
|
if parent.autoload?(cname)
|
||||||
@ -133,7 +139,7 @@ module Zeitwerk
|
|||||||
# and the constant path would escape unloadable_cpath? This is just
|
# and the constant path would escape unloadable_cpath? This is just
|
||||||
# defensive code to clean things up as much as we are able to.
|
# defensive code to clean things up as much as we are able to.
|
||||||
unload_cref(parent, cname)
|
unload_cref(parent, cname)
|
||||||
abspaths_of_unloaded_crefs.add(abspath)
|
unloaded_files.add(abspath) if ruby?(abspath)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -144,14 +150,10 @@ module Zeitwerk
|
|||||||
end
|
end
|
||||||
|
|
||||||
unload_cref(parent, cname)
|
unload_cref(parent, cname)
|
||||||
abspaths_of_unloaded_crefs.add(abspath)
|
unloaded_files.add(abspath) if ruby?(abspath)
|
||||||
end
|
end
|
||||||
|
|
||||||
unless abspaths_of_unloaded_crefs.empty?
|
unless unloaded_files.empty?
|
||||||
# We remove these abspaths from $LOADED_FEATURES because, otherwise,
|
|
||||||
# `require`'s idempotence would prevent newly defined autoloads from
|
|
||||||
# loading them again.
|
|
||||||
#
|
|
||||||
# Bootsnap decorates Kernel#require to speed it up using a cache and
|
# Bootsnap decorates Kernel#require to speed it up using a cache and
|
||||||
# this optimization does not check if $LOADED_FEATURES has the file.
|
# 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
|
# Rails applications may depend on bootsnap, so for unloading to work
|
||||||
# in that setting it is preferable that we restrict our API choice to
|
# in that setting it is preferable that we restrict our API choice to
|
||||||
# one of those methods.
|
# one of those methods.
|
||||||
$LOADED_FEATURES.reject! { |file| abspaths_of_unloaded_crefs.member?(file) }
|
$LOADED_FEATURES.reject! { |file| unloaded_files.member?(file) }
|
||||||
end
|
end
|
||||||
|
|
||||||
autoloads.clear
|
autoloads.clear
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Zeitwerk
|
module Zeitwerk
|
||||||
VERSION = "2.5.2"
|
VERSION = "2.5.3"
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user