Module: DeepCover::KernelAutoloadOverride
- Extended by:
- ModuleOverride
- Defined in:
- lib/deep_cover/core_ext/autoload_overrides.rb
Instance Attribute Summary
Attributes included from ModuleOverride
Instance Method Summary collapse
-
#autoload(name, path) ⇒ Object
JRuby has different semantics for Kernel.autoload and Kernel#autoload.
Methods included from ModuleOverride
Instance Method Details
#autoload(name, path) ⇒ Object
JRuby has different semantics for Kernel.autoload and Kernel#autoload
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/deep_cover/core_ext/autoload_overrides.rb', line 89 def autoload(name, path) if Kernel.equal?(self) # Yeah, this is weird # https://github.com/jruby/jruby/issues/5466 mod = Object.singleton_class elsif self.is_a?(Module) mod = self else mod = self.class end autoload_path = DeepCover.autoload_tracker.autoload_path_for(mod, name, path) mod.autoload_without_deep_cover(name, autoload_path) end |