module ActiveRecord::Marshalling
def format_version=(version)
def format_version=(version) case version when 6.1 Methods.remove_method(:marshal_dump) if Methods.method_defined?(:marshal_dump) when 7.1 Methods.alias_method(:marshal_dump, :_marshal_dump_7_1) else raise ArgumentError, "Unknown marshalling format: #{version.inspect}" end @format_version = version end