Changed implementation of For in such a way that it only depends on the existence of a each method. This allows drops to simply implement each for enumeration

This commit is contained in:
Tobias Lütke
2008-05-08 12:30:48 -04:00
parent 7f58cbf82d
commit 4c0cfae0b7
9 changed files with 94 additions and 47 deletions
+1
View File
@@ -60,6 +60,7 @@ module Liquid
# push new local scope on the stack. use <tt>Context#stack</tt> instead
def push
raise StackLevelError, "Nesting too deep" if @scopes.length > 100
@scopes.unshift({})
end