Conversation
We should try to avoid relying on the correctness of ruby code to avoid crashes (or C assertion failures which will be crashes outside of development). If I revert this commit and test against Shopify/liquid-c#138, then I get the following error in development (or a crash with |
|
Yeah, the problem is that the It might be possible to recursively freeze unfrozen children in |
|
That is a debug assertion though. We could raise instead |
|
I changed it to raise an error instead of an assertion error in Shopify/liquid-c@61e88b3. The error looks like this: |
Commit 1: Refactors setting options to a separate method in
Liquid::Templatewhich is reused for deserialization.Commit 2: Freeze blocks in reverse order of creation. Serialization requires the blocks are frozen in reverse order from when it's created (because it requires that the child is frozen before the parent is frozen).