blank and empty as variable names

This commit is contained in:
Florian Weingarten
2015-06-04 12:30:50 -04:00
parent c319240174
commit 4c22cef341
4 changed files with 31 additions and 9 deletions
+6 -6
View File
@@ -78,17 +78,17 @@ module Liquid
private
def equal_variables(left, right)
if left.is_a?(Symbol)
if right.respond_to?(left)
return right.send(left.to_s)
if left.is_a?(Liquid::Expression::MethodLiteral)
if right.respond_to?(left.method_name)
return right.send(left.method_name)
else
return nil
end
end
if right.is_a?(Symbol)
if left.respond_to?(right)
return left.send(right.to_s)
if right.is_a?(Liquid::Expression::MethodLiteral)
if left.respond_to?(right.method_name)
return left.send(right.method_name)
else
return nil
end