You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the issue is RubyGems redefines Kernel#require but not Kernel.require. The original Kernel#require is a module_function, so after RubyGems we have: Kernel#require -> RubyGems require; Kernel.require -> the initial core require with lazy-rubygems handling (line 243).
And indeed, on CRuby:
module_function does not act on the alias.
Thanks to @rafaelfranca for alerting about the warning this was issuing,
and to @matthewd for helping understand the root cause.
Reported by @nirvdrum.
With zeitwerk we can end up in a stack overflow that looks like:
So the issue is RubyGems redefines Kernel#require but not Kernel.require. The original Kernel#require is a module_function, so after RubyGems we have: Kernel#require -> RubyGems require; Kernel.require -> the initial core require with lazy-rubygems handling (line 243).
And indeed, on CRuby:
And on TruffleRuby:
But Kernel.require should be the one without lazy-rubygems behavior, i.e.,
gem_original_require
in core/kernel.rb.The text was updated successfully, but these errors were encountered: