Sha256: 0fd6676294987c9d8acffbf69811c4efaf789264fbae9e572b0d11a9817a730f
Contents?: true
Size: 637 Bytes
Versions: 100
Compression:
Stored size: 637 Bytes
Contents
# frozen_string_literal: true module ActiveSupport module MarshalWithAutoloading # :nodoc: def load(source, proc = nil) super(source, proc) rescue ArgumentError, NameError => exc if exc.message.match(%r|undefined class/module (.+?)(?:::)?\z|) # try loading the class/module loaded = $1.constantize raise unless $1 == loaded.name # if it is an IO we need to go back to read the object source.rewind if source.respond_to?(:rewind) retry else raise exc end end end end Marshal.singleton_class.prepend(ActiveSupport::MarshalWithAutoloading)
Version data entries
100 entries across 91 versions & 12 rubygems