mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
Clean-up Context#stack.
This commit is contained in:
+4
-10
@@ -86,17 +86,11 @@ 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
|
ensure
|
||||||
result = yield
|
pop
|
||||||
ensure
|
|
||||||
pop
|
|
||||||
end
|
|
||||||
|
|
||||||
result
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear_instance_assigns
|
def clear_instance_assigns
|
||||||
|
|||||||
Reference in New Issue
Block a user