brew vendor-gems: commit updates.
This commit is contained in:
parent
d1ebb4a5eb
commit
930c54fa49
@ -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.3/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.5.4/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.4.4/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"
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
module Kernel
|
||||
module_function
|
||||
|
||||
# We are going to decorate Kernel#require with two goals.
|
||||
# Zeitwerk's main idea is to define autoloads for project constants, and then
|
||||
# intercept them when triggered in this thin `Kernel#require` wrapper.
|
||||
#
|
||||
# First, by intercepting Kernel#require calls, we are able to autovivify
|
||||
# modules on required directories, and also do internal housekeeping when
|
||||
# managed files are loaded.
|
||||
# That allows us to complete the circle, invoke callbacks, autovivify modules,
|
||||
# define autoloads for just autoloaded namespaces, update internal state, etc.
|
||||
#
|
||||
# On the other hand, if you publish a new version of a gem that is now managed
|
||||
# by Zeitwerk, client code can reference directly your classes and modules and
|
||||
@ -17,7 +17,7 @@ module Kernel
|
||||
#
|
||||
# We cannot decorate with prepend + super because Kernel has already been
|
||||
# included in Object, and changes in ancestors don't get propagated into
|
||||
# already existing ancestor chains.
|
||||
# already existing ancestor chains on Ruby < 3.0.
|
||||
alias_method :zeitwerk_original_require, :require
|
||||
|
||||
# @sig (String) -> true | false
|
||||
@ -144,7 +144,13 @@ module Zeitwerk
|
||||
end
|
||||
|
||||
to_unload.each do |cpath, (abspath, (parent, cname))|
|
||||
unless on_unload_callbacks.empty?
|
||||
# We have to check cdef? in this condition. Reason is, constants whose
|
||||
# file does not define them have to be kept in to_unload as explained
|
||||
# in the implementation of on_file_autoloaded.
|
||||
#
|
||||
# If the constant is not defined, on_unload should not be triggered
|
||||
# for it.
|
||||
if !on_unload_callbacks.empty? && cdef?(parent, cname)
|
||||
value = parent.const_get(cname)
|
||||
run_on_unload_callbacks(cpath, value, abspath)
|
||||
end
|
||||
@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Zeitwerk
|
||||
VERSION = "2.5.3"
|
||||
VERSION = "2.5.4"
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user