mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Clean-up Context#stack.
This commit is contained in:
@@ -86,19 +86,13 @@ module Liquid
|
||||
# end
|
||||
#
|
||||
# context['var] #=> nil
|
||||
def stack(new_scope={},&block)
|
||||
result = nil
|
||||
def stack(new_scope={})
|
||||
push(new_scope)
|
||||
|
||||
begin
|
||||
result = yield
|
||||
yield
|
||||
ensure
|
||||
pop
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
def clear_instance_assigns
|
||||
@scopes[0] = {}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user