Ruby 1.9.1 bugfixes

Signed-off-by: Tobias Lütke <[email protected]>
This commit is contained in:
Jakub Kuźma
2009-04-17 06:33:20 +08:00
committed by Tobias Lütke
parent 56f1aa9b4a
commit daadb1a2d6
4 changed files with 30 additions and 31 deletions
+3 -5
View File
@@ -21,7 +21,7 @@ module Liquid
@name = match[1]
if markup.match(/#{FilterSeparator}\s*(.*)/)
filters = Regexp.last_match(1).split(/#{FilterSeparator}/)
filters.each do |f|
filters.each do |f|
if matches = f.match(/\s*(\w+)/)
filtername = matches[1]
filterargs = f.scan(/(?:#{FilterArgumentSeparator}|#{ArgumentSeparator})\s*(#{QuotedFragment})/).flatten
@@ -34,8 +34,7 @@ module Liquid
def render(context)
return '' if @name.nil?
output = context[@name]
@filters.inject(output) do |output, filter|
@filters.inject(context[@name]) do |output, filter|
filterargs = filter[1].to_a.collect do |a|
context[a]
end
@@ -45,7 +44,6 @@ module Liquid
raise FilterNotFound, "Error - filter '#{filter[0]}' in '#{@markup.strip}' could not be found."
end
end
output
end
end
end
end