From 239cfa5a440fd9b210cd011c53afed74bab3cac9 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Tue, 12 May 2015 16:11:32 -0400 Subject: [PATCH] Use find_variable for parentloop --- lib/liquid/tags/for.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/tags/for.rb b/lib/liquid/tags/for.rb index 33f12af..05b1b93 100644 --- a/lib/liquid/tags/for.rb +++ b/lib/liquid/tags/for.rb @@ -99,7 +99,7 @@ module Liquid # Store our progress through the collection for the continue flag context.registers[:for][@name] = from + segment.length - parent_loop = context['forloop'.freeze] + parent_loop = context.find_variable('forloop'.freeze) context.stack do segment.each_with_index do |item, index|