123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::Marshalling

Relationships & Source Files
Namespace Children
Modules:
Defined in: activerecord/lib/active_record/marshalling.rb

Class Attribute Summary

Class Attribute Details

.format_version (rw)

[ GitHub ]

  
# File 'activerecord/lib/active_record/marshalling.rb', line 8

attr_reader :format_version

.format_version=(version) (rw)

[ GitHub ]

  
# File 'activerecord/lib/active_record/marshalling.rb', line 10

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