fix failing test "recursively_included_template_does_not_produce_endless_loop", push needs to come before exception raise since pop is in ensure block and always happens.

This commit is contained in:
Steven Soroka
2011-04-24 01:09:56 -05:00
parent 7bbb4ff84f
commit 59a63e0fe5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -63,8 +63,8 @@ module Liquid
# Push new local scope on the stack. use <tt>Context#stack</tt> instead
def push(new_scope={})
raise StackLevelError, "Nesting too deep" if @scopes.length > 100
@scopes.unshift(new_scope)
raise StackLevelError, "Nesting too deep" if @scopes.length > 100
end
# Merge a hash of variables in the current local scope