the variables should be stored in the normal environment, not in the register

This commit is contained in:
Michael Richardson
2010-08-31 17:26:41 -04:00
parent ca2fa587cf
commit 97f18112b2
+2 -2
View File
@@ -25,8 +25,8 @@ module Liquid
end
def render(context)
value = context.registers[@variable] ||= 0
context.registers[@variable] = value + 1
value = context.environments.first[@variable] ||= 0
context.environments.first[@variable] = value + 1
value.to_s
end