No, this is definitely not intended to fail. We’ll take a look.

> On 22 Feb 2016, at 13:07, Denis Kudriashov <[email protected]> wrote:
> 
> And maybe it is not issue and behaviour is correct.
> 
> We want to substitute class with some object but full object graph includes 
> instance of that class. In such case Fuel will use substitution as reference 
> to class of serializable instance. And on materialisation substitution can 
> not understand #fuelNew: protocol.
> 
> 2016-02-22 11:36 GMT+01:00 Denis Kudriashov <[email protected] 
> <mailto:[email protected]>>:
> Hi.
> 
> I detect strange bug. Substitution Array class is not working. Try this:
> 
> s := ByteArray new writeStream.
> serializer := FLSerializer newDefault.
>       serializer analyzer 
>         when: [ :o | o==Array ] 
>         substituteBy: [ :o |  #instead ].
>    serializer serialize: {Array} on: s
> .
> s2 := s contents readStream.
> 
> 
> object := (FLMaterializer newDefault materializeFrom: s2) root.
> 
> 
> Interesting that other classes are working correctly.
> I open issue 17669 
> <https://pharo.fogbugz.com/f/cases/17669/Fuel-substitution-for-Array-class-is-not-working>

Reply via email to