Module: RequireHooks::LoadIseq
- Defined in:
- lib/require-hooks/mode/load_iseq.rb
Instance Method Summary collapse
Instance Method Details
#load_iseq(path) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/require-hooks/mode/load_iseq.rb', line 9 def load_iseq(path) ctx = RequireHooks.context_for(path) # Early-return for non-trackable paths return if ctx.empty? ctx.run_around_load_callbacks(path) do iseq = RequireHooks::Iseq.compile_with_coverage(ctx, path) { defined?(super) && super } iseq.eval EMPTY_ISEQ end end |