File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,24 @@ def infinity(options = {})
327327 ::Float ::INFINITY * ( options [ :negative ] ? -1 : 1 )
328328 end if AR4_COMPAT
329329
330+ private
331+
332+ # TODO marshaling worked in 1.3.7 ,,, got broken in 1.3.8 (due @adapter)
333+ # but the fix introduced in 1.3.10 causes backwards (1.3) incompatibility
334+ # ... for now should be fine - there's likely more refactoring to happen!
335+
336+ def marshal_dump
337+ # NOTE: disabled oid_type ... due range warnings (maybe they're fine) :
338+ # unknown OID 3904: failed to recognize type of 'int4_range'. It will be treated as String.
339+ #oid_type if respond_to?(:oid_type)
340+ @adapter = nil
341+ instance_variables . map { |var | [ var , instance_variable_get ( var ) ] }
342+ end
343+
344+ def marshal_load ( data )
345+ data . each { |pair | instance_variable_set ( pair [ 0 ] , pair [ 1 ] ) }
346+ end
347+
330348 # @note Based on *active_record/connection_adapters/postgresql/cast.rb* (4.0).
331349 module Cast
332350
You can’t perform that action at this time.
0 commit comments