module DeepCover::InstructionSequenceLoadIseq

Public Class Methods

load_iseq_logic(path) click to toggle source
# File lib/deep_cover/core_ext/instruction_sequence_load_iseq.rb, line 18
def self.load_iseq_logic(path)
  return unless DeepCover.running?
  return unless DeepCover.tracked_file_path?(path)

  covered_code = DeepCover.coverage.covered_code_or_warn(path)
  return unless covered_code

  covered_code.compile_or_warn
end

Public Instance Methods

load_iseq(path) click to toggle source
Calls superclass method
# File lib/deep_cover/core_ext/instruction_sequence_load_iseq.rb, line 7
def load_iseq(path)
  compiled = InstructionSequenceLoadIseq.load_iseq_logic(path)

  return compiled if compiled

  # By default there is no super, but if bootsnap is there, and things are in the right order,
  # we could possibly fallback to it as usual to keep the perf gain. Same for other possible
  # tools using #load_iseq
  super if defined?(super)
end