• S
    Fix false positive mutation detection when JSON is used with serialize · 6007e584
    Sean Griffin 提交于
    When looking for mutation, we compare the serialized version of the
    value to the before_type_cast form. `Type::Serialized` was breaking this
    contract by passing the already serialized attribute to the subtype's
    mutation detection. This never manifested previously, as all mutable
    subtypes either didn't do anything in their `serialize` method, or had a
    way to detect double serialization (e.g. `is_a?(String)`). However, now
    that JSON types can handle string primitives, we need to avoid double
    serialization.
    
    Fixes #24993.
    6007e584
serialized.rb 1.4 KB