Module: Bootsnap::CompileCache::ISeq::InstructionSequenceMixin

Defined in:
lib/bootsnap/compile_cache/iseq.rb

Instance Method Summary collapse

Instance Method Details

#compile_option=(hash) ⇒ Object



65
66
67
68
# File 'lib/bootsnap/compile_cache/iseq.rb', line 65

def compile_option=(hash)
  super(hash)
  Bootsnap::CompileCache::ISeq.compile_option_updated
end

#load_iseq(path) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/bootsnap/compile_cache/iseq.rb', line 51

def load_iseq(path)
  # Having coverage enabled prevents iseq dumping/loading.
  return nil if defined?(Coverage) && Bootsnap::CompileCache::Native.coverage_running?

  Bootsnap::CompileCache::ISeq.fetch(path.to_s)
rescue Errno::EACCES
  Bootsnap::CompileCache.permission_error(path)
rescue RuntimeError => e
  if e.message =~ /unmatched platform/
    puts("unmatched platform for file #{path}")
  end
  raise
end