Ugly hack for compatibility with Rails 2.1

This commit is contained in:
Stefano Cobianchi
2008-06-04 17:18:41 +02:00
parent 4c30922d8e
commit 3ef9d2f4f9

View File

@@ -131,7 +131,8 @@ module Liquid
private
# Uses the <tt>Liquid::TemplateParser</tt> regexp to tokenize the passed source
def tokenize(source)
def tokenize(source)
source = source.source if source.respond_to?(:source)
return [] if source.to_s.empty?
tokens = source.split(TemplateParser)