跳至内容 跳至搜索
命名空间
方法
F

属性

[R] format_version

类公共方法

format_version=(version)

# 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