Class: Module

Inherits:
Object
  • Object
show all
Includes:
T::Sig
Defined in:
lib/tapioca/runtime/trackers/autoload.rb,
lib/tapioca/runtime/trackers/mixin.rb,
lib/tapioca/runtime/trackers/method_definition.rb

Overview

We need to do the alias-method-chain dance since Bootsnap does the same, and prepended modules and alias-method-chain don’t play well together.

So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked! That’s because RubyGems does alias-method-chain for Kernel#require and such, so, if Bootsnap were to do prepend, it might end up breaking RubyGems.

Direct Known Subclasses

Tapioca::TypeVariableModule

Instance Method Summary collapse

Instance Method Details

#autoload(const_name, path) ⇒ Object



69
70
71
72
# File 'lib/tapioca/runtime/trackers/autoload.rb', line 69

def autoload(const_name, path)
  Tapioca::Runtime::Trackers::Autoload.register("#{self}::#{const_name}")
  autoload_without_tapioca(const_name, path)
end

#autoload_without_tapiocaObject



67
# File 'lib/tapioca/runtime/trackers/autoload.rb', line 67

alias_method(:autoload_without_tapioca, :autoload)