Module: RSpecTracer::Tracker::IOHooks::KernelReads Private

Defined in:
lib/rspec_tracer/tracker/io_hooks/kernel.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Prepended onto both Kernel and Kernel.singleton_class so both implicit ‘load ’x.rb’‘ (method-lookup via Object’s ancestor chain) and explicit ‘Kernel.load(’x.rb’)‘ (singleton dispatch) fire the hook. Records as :ruby - CoverageAdapter also sees these files through the Coverage module’s load-path instrumentation; the example registry dedupes the overlap.

Instance Method Summary collapse

Instance Method Details

#load(path) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Internal method on the tracer pipeline.



19
20
21
22
# File 'lib/rspec_tracer/tracker/io_hooks/kernel.rb', line 19

def load(path, ...)
  IOHooks.record_ruby_load(path) if Thread.current[BUCKET_KEY]
  super
end