Clean-up Context#stack.

This commit is contained in:
thedarkone
2011-01-28 21:16:22 -05:00
committed by Tobias Lütke
parent 4fec29f288
commit 6d0bb3303c
+2 -8
View File
@@ -86,19 +86,13 @@ module Liquid
# end # end
# #
# context['var] #=> nil # context['var] #=> nil
def stack(new_scope={},&block) def stack(new_scope={})
result = nil
push(new_scope) push(new_scope)
yield
begin
result = yield
ensure ensure
pop pop
end end
result
end
def clear_instance_assigns def clear_instance_assigns
@scopes[0] = {} @scopes[0] = {}
end end