mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user