tweak some small thing

This commit is contained in:
John Bintz 2010-05-19 10:11:20 -04:00
parent 513cd859ea
commit d3b4747704

View File

@ -265,12 +265,16 @@ module Apache
@conditions << rewrite_cond @conditions << rewrite_cond
end end
def initial_blank!
@conditions.empty ? nil : ''
end
def to_s def to_s
"#{tag} #{[@from.source.quoteize, @to.quoteize, @options].compact.flatten * " "}" "#{tag} #{[@from.source.quoteize, @to.quoteize, @options].compact.flatten * " "}"
end end
def to_a def to_a
[ ('' if !@conditions.empty?), @conditions.collect(&:to_s), super ].flatten [ intial_blank!, @conditions.collect(&:to_s), super ].flatten
end end
# Test this RewriteRule, ensuring the RewriteConds also match # Test this RewriteRule, ensuring the RewriteConds also match