Avoid warnings for shadowed outer local variable

This commit is contained in:
Marcus Stollsteimer
2012-11-18 10:19:05 +01:00
parent fea9c54768
commit 90b40ffb4b
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ module Liquid
end
if variable.is_a?(Array)
variable.collect do |variable|
context[@template_name[1..-2]] = variable
variable.collect do |var|
context[@template_name[1..-2]] = var
partial.render(context)
end
else
+3 -3
View File
@@ -11,9 +11,9 @@ module Liquid
context.stack do
# First condition is interpreted backwards ( if not )
block = @blocks.first
unless block.evaluate(context)
return render_all(block.attachment, context)
first_block = @blocks.first
unless first_block.evaluate(context)
return render_all(first_block.attachment, context)
end
# After the first condition unless works just like if