mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Avoid warnings for shadowed outer local variable
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -30,4 +30,4 @@ module Liquid
|
||||
|
||||
|
||||
Template.register_tag('unless', Unless)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user