Force #to_liquid call in InputIterator#each

This commit is contained in:
Justin Li
2016-02-01 11:44:54 -05:00
parent 08de6ed2c5
commit e99c7e2eec
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -60,3 +60,9 @@ class NilClass
self
end
end
class Proc
def to_liquid # :nodoc:
self
end
end
+1 -1
View File
@@ -398,7 +398,7 @@ module Liquid
def each
@input.each do |e|
yield(e.respond_to?(:to_liquid) ? e.to_liquid : e)
yield(e.to_liquid)
end
end
end