Freeze the body for case

This commit is contained in:
Peter Zhu
2020-11-27 11:29:17 -05:00
parent 1850511334
commit 0a645e72c1

View File

@@ -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