lib/bootsnap/compile_cache/iseq.rb in bootsnap-1.4.8-java vs lib/bootsnap/compile_cache/iseq.rb in bootsnap-1.4.9.rc1
- old
+ new
@@ -7,28 +7,28 @@
module ISeq
class << self
attr_accessor(:cache_dir)
end
- def self.input_to_storage(_, path)
+ def self.input_to_storage(_, path, _args)
RubyVM::InstructionSequence.compile_file(path).to_binary
rescue SyntaxError
raise(Uncompilable, 'syntax error')
end
- def self.storage_to_output(binary)
+ def self.storage_to_output(binary, _args)
RubyVM::InstructionSequence.load_from_binary(binary)
rescue RuntimeError => e
if e.message == 'broken binary format'
STDERR.puts("[Bootsnap::CompileCache] warning: rejecting broken binary")
nil
else
raise
end
end
- def self.input_to_output(_)
+ def self.input_to_output(_, _)
nil # ruby handles this
end
module InstructionSequenceMixin
def load_iseq(path)
@@ -36,10 +36,11 @@
return nil if defined?(Coverage) && Bootsnap::CompileCache::Native.coverage_running?
Bootsnap::CompileCache::Native.fetch(
Bootsnap::CompileCache::ISeq.cache_dir,
path.to_s,
- Bootsnap::CompileCache::ISeq
+ Bootsnap::CompileCache::ISeq,
+ nil,
)
rescue Errno::EACCES
Bootsnap::CompileCache.permission_error(path)
rescue RuntimeError => e
if e.message =~ /unmatched platform/