use bytesize, not length

This commit is contained in:
Florian Weingarten
2019-04-17 18:55:13 +01:00
parent b0629f17f7
commit c89ce9c2ed
4 changed files with 21 additions and 3 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ module Liquid
end
def check_resources(context, node_output)
context.resource_limits.render_length += node_output.length
context.resource_limits.render_length += node_output.bytesize
return unless context.resource_limits.reached?
raise MemoryError.new("Memory limits exceeded".freeze)
end