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

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

View File

@@ -2,13 +2,13 @@
extras_path = File.join File.dirname(__FILE__), 'extra'
$LOAD_PATH.unshift(extras_path) unless $LOAD_PATH.include? extras_path
require 'rubygems' unless RUBY_VERSION =~ /^(?:1.9.*)$/
require 'rubygems' unless RUBY_VERSION >= '1.9'
require 'test/unit'
require 'test/unit/assertions'
require 'caller'
require 'breakpoint'
require 'ruby-debug'
require File.join File.dirname(__FILE__), '..', 'lib', 'liquid'
require File.join(File.dirname(__FILE__), '..', 'lib', 'liquid')
module Test