freeze '-' VariableLookup in Expression

This commit is contained in:
Michael Go
2025-01-07 14:32:46 -04:00
parent 04bd9dbe90
commit 0a17c15289
+3 -1
View File
@@ -58,7 +58,9 @@ module Liquid
'false' => false,
'blank' => '',
'empty' => '',
'-' => VariableLookup.parse("-", nil),
# in lax mode, minus sign can be a VariableLookup
# For simplicity and performace, we treat it like a literal
'-' => VariableLookup.parse("-", nil).freeze,
}.freeze
DOT = ".".ord