• S
    Allow attributes with a proc default to be marshalled · 0af36c62
    Sean Griffin 提交于
    We don't implement much custom marshalling logic for these objects, but
    the proc default case needs to be handled separately. Unfortunately
    there's no way to just say "do what you would have done but with this
    value for one ivar", so we have to manually implement `marshal_load` as
    well.
    
    The test case is a little bit funky, but I'd really like an equality
    test in there, and there's no easy way to add one now that this is out
    of AR (since the `attributes` method isn't here)
    
    Fixes #31216
    0af36c62
attributes_test.rb 2.3 KB