From 0a645e72c14f972d4d3c0c94873ec3654b1fae00 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 27 Nov 2020 11:29:17 -0500 Subject: [PATCH] Freeze the body for case --- lib/liquid/tags/case.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/liquid/tags/case.rb b/lib/liquid/tags/case.rb index 9aeb797..43d4b3b 100644 --- a/lib/liquid/tags/case.rb +++ b/lib/liquid/tags/case.rb @@ -19,7 +19,7 @@ module Liquid end def parse(tokens) - body = new_body + body = case_body = new_body body = @blocks.last.attachment while parse_body(body, tokens) @blocks.each do |condition| body = condition.attachment @@ -28,6 +28,7 @@ module Liquid body.freeze end end + case_body.freeze end def nodelist