<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,7 @@ module Liquid
   #
   # Example:
   #
-  #   c = Condition.new('1', '==', '1') 
+  #   c = Condition.new('1', '==', '1')
   #   c.evaluate #=&gt; true
   #
   class Condition #:nodoc:
@@ -17,33 +17,33 @@ module Liquid
       '&lt;=' =&gt; :&lt;=,
       'contains' =&gt; lambda { |cond, left, right| left.include?(right) },
     }
-    
+
     def self.operators
       @@operators
     end
 
     attr_reader :attachment
     attr_accessor :left, :operator, :right
-  
+
     def initialize(left = nil, operator = nil, right = nil)
       @left, @operator, @right = left, operator, right
       @child_relation  = nil
       @child_condition = nil
     end
-    
+
     def evaluate(context = Context.new)
-      result = interpret_condition(left, right, operator, context)        
-      
+      result = interpret_condition(left, right, operator, context)
+
       case @child_relation
-      when :or 
+      when :or
         result || @child_condition.evaluate(context)
-      when :and 
+      when :and
         result &amp;&amp; @child_condition.evaluate(context)
       else
         result
-      end      
-    end                    
-    
+      end
+    end
+
     def or(condition)
       @child_relation, @child_condition = :or, condition
     end
@@ -51,25 +51,25 @@ module Liquid
     def and(condition)
       @child_relation, @child_condition = :and, condition
     end
-  
+
     def attach(attachment)
       @attachment = attachment
     end
-  
+
     def else?
       false
-    end                          
-    
+    end
+
     def inspect
       &quot;#&lt;Condition #{[@left, @operator, @right].compact.join(' ')}&gt;&quot;
     end
-    
+
     private
-  
+
     def equal_variables(left, right)
       if left.is_a?(Symbol)
         if right.respond_to?(left)
-          return right.send(left.to_s) 
+          return right.send(left.to_s)
         else
           return nil
         end
@@ -77,47 +77,44 @@ module Liquid
 
       if right.is_a?(Symbol)
         if left.respond_to?(right)
-          return left.send(right.to_s) 
+          return left.send(right.to_s)
         else
           return nil
         end
       end
 
-      left == right      
-    end    
+      left == right
+    end
 
     def interpret_condition(left, right, op, context)
-
-      # If the operator is empty this means that the decision statement is just 
-      # a single variable. We can just poll this variable from the context and 
+      # If the operator is empty this means that the decision statement is just
+      # a single variable. We can just poll this variable from the context and
       # return this as the result.
-      return context[left] if op == nil      
+      return context[left] if op == nil
 
       left, right = context[left], context[right]
-            
 
       operation = self.class.operators[op] || raise(ArgumentError.new(&quot;Unknown operator #{op}&quot;))
 
       if operation.respond_to?(:call)
         operation.call(self, left, right)
-      elsif left.respond_to?(operation) and right.respond_to?(operation)        
+      elsif left.respond_to?(operation) and right.respond_to?(operation)
         left.send(operation, right)
       else
         nil
       end
-    end    
-  end           
+    end
+  end
 
 
   class ElseCondition &lt; Condition
-      
-    def else? 
+    def else?
       true
     end
-  
+
     def evaluate(context)
       true
     end
   end
 
-end
\ No newline at end of file
+end</diff>
      <filename>lib/liquid/condition.rb</filename>
    </modified>
    <modified>
      <diff>@@ -224,7 +224,7 @@ module Liquid
 
       object
     end
-    
+
     def filtered_variable(markup)
       Variable.new(markup).render(self)
     end</diff>
      <filename>lib/liquid/context.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 module Liquid
-  
+
   # A drop in liquid is a class which allows you to to export DOM like things to liquid
-  # Methods of drops are callable. 
-  # The main use for liquid drops is the implement lazy loaded objects. 
-  # If you would like to make data available to the web designers which you don't want loaded unless needed then 
+  # Methods of drops are callable.
+  # The main use for liquid drops is the implement lazy loaded objects.
+  # If you would like to make data available to the web designers which you don't want loaded unless needed then
   # a drop is a great way to do that
   #
   # Example:
@@ -13,38 +13,39 @@ module Liquid
   #      Shop.current.products.find(:all, :order =&gt; 'sales', :limit =&gt; 10 )
   #   end
   # end
-  #  
+  #
   # tmpl = Liquid::Template.parse( ' {% for product in product.top_sales %} {{ product.name }} {%endfor%} '  )
-  # tmpl.render('product' =&gt; ProductDrop.new ) # will invoke top_sales query. 
+  # tmpl.render('product' =&gt; ProductDrop.new ) # will invoke top_sales query.
   #
-  # Your drop can either implement the methods sans any parameters or implement the before_method(name) method which is a 
+  # Your drop can either implement the methods sans any parameters or implement the before_method(name) method which is a
   # catch all
   class Drop
     attr_writer :context
 
-    # Catch all for the method 
+    # Catch all for the method
     def before_method(method)
       nil
     end
-    
+
     # called by liquid to invoke a drop
-    def invoke_drop(method)          
-      if self.class.public_instance_methods.include?(method.to_s)
-        send(method.to_sym) 
-      else        
+    def invoke_drop(method)
+      # for backward compatibility with Ruby 1.8
+      methods = self.class.public_instance_methods.map { |m| m.to_s }
+      if methods.include?(method.to_s)
+        send(method.to_sym)
+      else
         before_method(method)
       end
     end
-    
+
     def has_key?(name)
       true
     end
-    
+
     def to_liquid
       self
     end
 
     alias :[] :invoke_drop
   end
-  
 end</diff>
      <filename>lib/liquid/drop.rb</filename>
    </modified>
    <modified>
      <diff>@@ -190,9 +190,10 @@ class ContextTest &lt; Test::Unit::TestCase
     end
 
     context = Context.new(@template)
-    methods = context.strainer.methods
+    methods_before = context.strainer.methods.map { |method| method.to_s }
     context.add_filters(filter)
-    assert_equal (methods + ['hi']).sort, context.strainer.methods.sort
+    methods_after = context.strainer.methods.map { |method| method.to_s }
+    assert_equal (methods_before + [&quot;hi&quot;]).sort, methods_after.sort
   end
 
   def test_add_item_in_outer_scope
@@ -289,11 +290,9 @@ class ContextTest &lt; Test::Unit::TestCase
   end
 
   def test_access_hashes_with_hash_notation
-
     @context['products'] = {'count' =&gt; 5, 'tags' =&gt; ['deepsnow', 'freestyle'] }
     @context['product'] = {'variants' =&gt; [ {'title' =&gt; 'draft151cm'}, {'title' =&gt; 'element151cm'}  ]}
 
-
     assert_equal 5, @context['products[&quot;count&quot;]']
     assert_equal 'deepsnow', @context['products[&quot;tags&quot;][0]']
     assert_equal 'deepsnow', @context['products[&quot;tags&quot;].first']
@@ -417,25 +416,25 @@ class ContextTest &lt; Test::Unit::TestCase
   end
 
   def test_lambda_as_variable
-    @context['dynamic'] = lambda { 'Hello' }
+    @context['dynamic'] = proc { 'Hello' }
 
     assert_equal 'Hello', @context['dynamic']
   end
 
   def test_nested_lambda_as_variable
-    @context['dynamic'] = { &quot;lambda&quot; =&gt; lambda { 'Hello' } }
+    @context['dynamic'] = { &quot;lambda&quot; =&gt; proc { 'Hello' } }
 
     assert_equal 'Hello', @context['dynamic.lambda']
   end
 
   def test_array_containing_lambda_as_variable
-    @context['dynamic'] = [1,2, lambda { 'Hello' } ,4,5]
+    @context['dynamic'] = [1,2, proc { 'Hello' } ,4,5]
 
     assert_equal 'Hello', @context['dynamic[2]']
   end
 
   def test_lambda_is_called_once
-    @context['callcount'] = lambda { @global ||= 0; @global += 1; @global.to_s }
+    @context['callcount'] = proc { @global ||= 0; @global += 1; @global.to_s }
 
     assert_equal '1', @context['callcount']
     assert_equal '1', @context['callcount']
@@ -445,7 +444,7 @@ class ContextTest &lt; Test::Unit::TestCase
   end
 
   def test_nested_lambda_is_called_once
-    @context['callcount'] = { &quot;lambda&quot; =&gt; lambda { @global ||= 0; @global += 1; @global.to_s } }
+    @context['callcount'] = { &quot;lambda&quot; =&gt; proc { @global ||= 0; @global += 1; @global.to_s } }
 
     assert_equal '1', @context['callcount.lambda']
     assert_equal '1', @context['callcount.lambda']
@@ -455,7 +454,7 @@ class ContextTest &lt; Test::Unit::TestCase
   end
 
   def test_lambda_in_array_is_called_once
-    @context['callcount'] = [1,2, lambda { @global ||= 0; @global += 1; @global.to_s } ,4,5]
+    @context['callcount'] = [1,2, proc { @global ||= 0; @global += 1; @global.to_s } ,4,5]
 
     assert_equal '1', @context['callcount[2]']
     assert_equal '1', @context['callcount[2]']
@@ -467,7 +466,7 @@ class ContextTest &lt; Test::Unit::TestCase
   def test_access_to_context_from_proc
     @context.registers[:magic] = 345392
 
-    @context['magic'] = lambda { @context.registers[:magic] }
+    @context['magic'] = proc { @context.registers[:magic] }
 
     assert_equal 345392, @context['magic']
   end</diff>
      <filename>test/context_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,14 +3,14 @@ require File.dirname(__FILE__) + '/helper'
 
 class StandardTagTest &lt; Test::Unit::TestCase
   include Liquid
-  
-  
-  def test_tag 
+
+
+  def test_tag
     tag = Tag.new('tag', [], [])
-    assert_equal 'liquid::tag', tag.name 
-    assert_equal '', tag.render(Context.new)    
+    assert_equal 'liquid::tag', tag.name
+    assert_equal '', tag.render(Context.new)
   end
-  
+
   def test_no_transform
     assert_template_result('this text should come out of the template without change...',
                            'this text should come out of the template without change...')
@@ -18,60 +18,60 @@ class StandardTagTest &lt; Test::Unit::TestCase
     assert_template_result('&lt;blah&gt;','&lt;blah&gt;')
     assert_template_result('|,.:','|,.:')
     assert_template_result('','')
-    
+
     text = %|this shouldnt see any transformation either but has multiple lines
               as you can clearly see here ...|
     assert_template_result(text,text)
   end
-  
+
   def test_has_a_block_which_does_nothing
     assert_template_result(%|the comment block should be removed  .. right?|,
                            %|the comment block should be removed {%comment%} be gone.. {%endcomment%} .. right?|)
-    
+
     assert_template_result('','{%comment%}{%endcomment%}')
     assert_template_result('','{%comment%}{% endcomment %}')
     assert_template_result('','{% comment %}{%endcomment%}')
     assert_template_result('','{% comment %}{% endcomment %}')
     assert_template_result('','{%comment%}comment{%endcomment%}')
     assert_template_result('','{% comment %}comment{% endcomment %}')
-    
+
     assert_template_result('foobar','foo{%comment%}comment{%endcomment%}bar')
     assert_template_result('foobar','foo{% comment %}comment{% endcomment %}bar')
     assert_template_result('foobar','foo{%comment%} comment {%endcomment%}bar')
     assert_template_result('foobar','foo{% comment %} comment {% endcomment %}bar')
-    
+
     assert_template_result('foo  bar','foo {%comment%} {%endcomment%} bar')
     assert_template_result('foo  bar','foo {%comment%}comment{%endcomment%} bar')
     assert_template_result('foo  bar','foo {%comment%} comment {%endcomment%} bar')
-    
+
     assert_template_result('foobar','foo{%comment%}
                                      {%endcomment%}bar')
   end
-  
+
   def test_for
     assert_template_result(' yo  yo  yo  yo ','{%for item in array%} yo {%endfor%}','array' =&gt; [1,2,3,4])
     assert_template_result('yoyo','{%for item in array%}yo{%endfor%}','array' =&gt; [1,2])
     assert_template_result(' yo ','{%for item in array%} yo {%endfor%}','array' =&gt; [1])
     assert_template_result('','{%for item in array%}{%endfor%}','array' =&gt; [1,2])
     expected = &lt;&lt;HERE
-  
+
   yo
-  
+
   yo
-  
+
   yo
-  
+
 HERE
     template = &lt;&lt;HERE
-{%for item in array%}  
+{%for item in array%}
   yo
-{%endfor%}  
+{%endfor%}
 HERE
     assert_template_result(expected,template,'array' =&gt; [1,2,3])
   end
-  
+
   def test_for_with_range
-    assert_template_result(' 1  2  3 ','{%for item in (1..3) %} {{item}} {%endfor%}')    
+    assert_template_result(' 1  2  3 ','{%for item in (1..3) %} {{item}} {%endfor%}')
   end
 
   def test_for_with_variable
@@ -82,7 +82,7 @@ HERE
     assert_template_result('a b c','{%for item in array%}{{item}}{%endfor%}','array' =&gt; ['a',' ','b',' ','c'])
     assert_template_result('abc','{%for item in array%}{{item}}{%endfor%}','array' =&gt; ['a','','b','','c'])
   end
-  
+
   def test_for_helpers
     assigns = {'array' =&gt; [1,2,3] }
     assert_template_result(' 1/3  2/3  3/3 ','{%for item in array%} {{forloop.index}}/{{forloop.length}} {%endfor%}',assigns)
@@ -93,41 +93,41 @@ HERE
     assert_template_result(' true  false  false ','{%for item in array%} {{forloop.first}} {%endfor%}',assigns)
     assert_template_result(' false  false  true ','{%for item in array%} {{forloop.last}} {%endfor%}',assigns)
   end
-  
+
   def test_for_and_if
     assigns = {'array' =&gt; [1,2,3] }
     assert_template_result('+--', '{%for item in array%}{% if forloop.first %}+{% else %}-{% endif %}{%endfor%}', assigns)
   end
-  
+
   def test_for_with_filtered_expressions
     assert_template_result('abc','{% for letter in letters|sort %}{{ letter }}{% endfor %}', 'letters' =&gt; %w{c b a})
   end
-  
+
   def test_limiting
     assigns = {'array' =&gt; [1,2,3,4,5,6,7,8,9,0]}
     assert_template_result('12','{%for i in array limit:2 %}{{ i }}{%endfor%}',assigns)
     assert_template_result('1234','{%for i in array limit:4 %}{{ i }}{%endfor%}',assigns)
     assert_template_result('3456','{%for i in array limit:4 offset:2 %}{{ i }}{%endfor%}',assigns)
-    assert_template_result('3456','{%for i in array limit: 4 offset: 2 %}{{ i }}{%endfor%}',assigns)        
+    assert_template_result('3456','{%for i in array limit: 4 offset: 2 %}{{ i }}{%endfor%}',assigns)
   end
-  
+
   def test_dynamic_variable_limiting
     assigns = {'array' =&gt; [1,2,3,4,5,6,7,8,9,0]}
     assigns['limit'] = 2
     assigns['offset'] = 2
-    assert_template_result('34','{%for i in array limit: limit offset: offset %}{{ i }}{%endfor%}',assigns)        
+    assert_template_result('34','{%for i in array limit: limit offset: offset %}{{ i }}{%endfor%}',assigns)
   end
-  
+
   def test_nested_for
     assigns = {'array' =&gt; [[1,2],[3,4],[5,6]] }
     assert_template_result('123456','{%for item in array%}{%for i in item%}{{ i }}{%endfor%}{%endfor%}',assigns)
   end
-  
+
   def test_offset_only
     assigns = {'array' =&gt; [1,2,3,4,5,6,7,8,9,0]}
     assert_template_result('890','{%for i in array offset:7 %}{{ i }}{%endfor%}',assigns)
   end
-  
+
   def test_pause_resume
     assigns = {'array' =&gt; {'items' =&gt; [1,2,3,4,5,6,7,8,9,0]}}
     markup = &lt;&lt;-MKUP
@@ -146,7 +146,7 @@ HERE
       XPCTD
     assert_template_result(expected,markup,assigns)
   end
-  
+
   def test_pause_resume_limit
     assigns = {'array' =&gt; {'items' =&gt; [1,2,3,4,5,6,7,8,9,0]}}
     markup = &lt;&lt;-MKUP
@@ -165,7 +165,7 @@ HERE
       XPCTD
     assert_template_result(expected,markup,assigns)
   end
-  
+
   def test_pause_resume_BIG_limit
     assigns = {'array' =&gt; {'items' =&gt; [1,2,3,4,5,6,7,8,9,0]}}
     markup = &lt;&lt;-MKUP
@@ -184,8 +184,8 @@ HERE
       XPCTD
       assert_template_result(expected,markup,assigns)
   end
-  
-  
+
+
   def test_pause_resume_BIG_offset
     assigns = {'array' =&gt; {'items' =&gt; [1,2,3,4,5,6,7,8,9,0]}}
     markup = %q({%for i in array.items limit:3 %}{{i}}{%endfor%}
@@ -200,19 +200,19 @@ HERE
       )
       assert_template_result(expected,markup,assigns)
   end
-  
+
   def test_assign
     assigns = {'var' =&gt; 'content' }
     assert_template_result('var2:  var2:content','var2:{{var2}} {%assign var2 = var%} var2:{{var2}}',assigns)
-    
+
   end
 
   def test_hyphenated_assign
     assigns = {'a-b' =&gt; '1' }
     assert_template_result('a-b:1 a-b:2','a-b:{{a-b}} {%assign a-b = 2 %}a-b:{{a-b}}',assigns)
-    
+
   end
-  
+
   def test_assign_with_colon_and_spaces
     assigns = {'var' =&gt; {'a:b c' =&gt; {'paged' =&gt; '1' }}}
     assert_template_result('var2: 1','{%assign var2 = var[&quot;a:b c&quot;].paged %}var2: {{var2}}',assigns)
@@ -230,62 +230,62 @@ HERE
   end
 
   def test_case
-    assigns = {'condition' =&gt; 2 }    
+    assigns = {'condition' =&gt; 2 }
     assert_template_result(' its 2 ','{% case condition %}{% when 1 %} its 1 {% when 2 %} its 2 {% endcase %}', assigns)
 
     assigns = {'condition' =&gt; 1 }
     assert_template_result(' its 1 ','{% case condition %}{% when 1 %} its 1 {% when 2 %} its 2 {% endcase %}', assigns)
 
     assigns = {'condition' =&gt; 3 }
-    assert_template_result('','{% case condition %}{% when 1 %} its 1 {% when 2 %} its 2 {% endcase %}', assigns)  
+    assert_template_result('','{% case condition %}{% when 1 %} its 1 {% when 2 %} its 2 {% endcase %}', assigns)
 
     assigns = {'condition' =&gt; &quot;string here&quot; }
-    assert_template_result(' hit ','{% case condition %}{% when &quot;string here&quot; %} hit {% endcase %}', assigns)  
+    assert_template_result(' hit ','{% case condition %}{% when &quot;string here&quot; %} hit {% endcase %}', assigns)
 
     assigns = {'condition' =&gt; &quot;bad string here&quot; }
-    assert_template_result('','{% case condition %}{% when &quot;string here&quot; %} hit {% endcase %}', assigns)  
+    assert_template_result('','{% case condition %}{% when &quot;string here&quot; %} hit {% endcase %}', assigns)
   end
-  
+
   def test_case_with_else
 
     assigns = {'condition' =&gt; 5 }
-    assert_template_result(' hit ','{% case condition %}{% when 5 %} hit {% else %} else {% endcase %}', assigns)  
+    assert_template_result(' hit ','{% case condition %}{% when 5 %} hit {% else %} else {% endcase %}', assigns)
 
     assigns = {'condition' =&gt; 6 }
-    assert_template_result(' else ','{% case condition %}{% when 5 %} hit {% else %} else {% endcase %}', assigns)  
-    
+    assert_template_result(' else ','{% case condition %}{% when 5 %} hit {% else %} else {% endcase %}', assigns)
+
     assigns = {'condition' =&gt; 6 }
-    assert_template_result(' else ','{% case condition %} {% when 5 %} hit {% else %} else {% endcase %}', assigns)  
-    
+    assert_template_result(' else ','{% case condition %} {% when 5 %} hit {% else %} else {% endcase %}', assigns)
+
 
   end
-  
+
   def test_case_on_size
-    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [])     
-    assert_template_result('1' ,   '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1])     
-    assert_template_result('2' ,   '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1])     
-    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1, 1])     
-    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1, 1, 1])     
-    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1, 1, 1, 1])     
-  end  
-  
+    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [])
+    assert_template_result('1' ,   '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1])
+    assert_template_result('2' ,   '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1])
+    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1, 1])
+    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1, 1, 1])
+    assert_template_result('',     '{% case a.size %}{% when 1 %}1{% when 2 %}2{% endcase %}', 'a' =&gt; [1, 1, 1, 1, 1])
+  end
+
   def test_case_on_size_with_else
-    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [])     
-    assert_template_result('1',    '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1])     
-    assert_template_result('2',    '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1])     
-    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1, 1])     
-    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1, 1, 1])     
-    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1, 1, 1, 1])     
-  end
-  
+    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [])
+    assert_template_result('1',    '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1])
+    assert_template_result('2',    '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1])
+    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1, 1])
+    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1, 1, 1])
+    assert_template_result('else', '{% case a.size %}{% when 1 %}1{% when 2 %}2{% else %}else{% endcase %}', 'a' =&gt; [1, 1, 1, 1, 1])
+  end
+
   def test_case_on_length_with_else
-    assert_template_result('else',  '{% case a.empty? %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})     
-    assert_template_result('false', '{% case false %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})     
-    assert_template_result('true',  '{% case true %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})     
-    assert_template_result('else',  '{% case NULL %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})     
+    assert_template_result('else',  '{% case a.empty? %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})
+    assert_template_result('false', '{% case false %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})
+    assert_template_result('true',  '{% case true %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})
+    assert_template_result('else',  '{% case NULL %}{% when true %}true{% when false %}false{% else %}else{% endcase %}', {})
   end
-  
-  def test_assign_from_case    
+
+  def test_assign_from_case
     # Example from the shopify forums
     code = %q({% case collection.handle %}{% when 'menswear-jackets' %}{% assign ptitle = 'menswear' %}{% when 'menswear-t-shirts' %}{% assign ptitle = 'menswear' %}{% else %}{% assign ptitle = 'womenswear' %}{% endcase %}{{ ptitle }})
     template = Liquid::Template.parse(code)
@@ -303,12 +303,12 @@ HERE
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; 3 })
     assert_template_result(' its 4 ', code, {'condition' =&gt; 4 })
     assert_template_result('', code, {'condition' =&gt; 5 })
-    
+
     code = '{% case condition %}{% when 1 or &quot;string&quot; or null %} its 1 or 2 or 3 {% when 4 %} its 4 {% endcase %}'
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; 1 })
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; 'string' })
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; nil })
-    assert_template_result('', code, {'condition' =&gt; 'something else' })    
+    assert_template_result('', code, {'condition' =&gt; 'something else' })
   end
 
   def test_case_when_comma
@@ -318,82 +318,82 @@ HERE
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; 3 })
     assert_template_result(' its 4 ', code, {'condition' =&gt; 4 })
     assert_template_result('', code, {'condition' =&gt; 5 })
-    
+
     code = '{% case condition %}{% when 1, &quot;string&quot;, null %} its 1 or 2 or 3 {% when 4 %} its 4 {% endcase %}'
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; 1 })
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; 'string' })
     assert_template_result(' its 1 or 2 or 3 ', code, {'condition' =&gt; nil })
-    assert_template_result('', code, {'condition' =&gt; 'something else' })    
+    assert_template_result('', code, {'condition' =&gt; 'something else' })
   end
-  
+
   def test_assign
-    assert_equal 'variable', Liquid::Template.parse( '{% assign a = &quot;variable&quot;%}{{a}}'  ).render            
+    assert_equal 'variable', Liquid::Template.parse( '{% assign a = &quot;variable&quot;%}{{a}}'  ).render
   end
-  
+
   def test_assign_is_global
-    assert_equal 'variable', Liquid::Template.parse( '{%for i in (1..2) %}{% assign a = &quot;variable&quot;%}{% endfor %}{{a}}'  ).render        
-  end  
-  
+    assert_equal 'variable', Liquid::Template.parse( '{%for i in (1..2) %}{% assign a = &quot;variable&quot;%}{% endfor %}{{a}}'  ).render
+  end
+
   def test_case_detects_bad_syntax
     assert_raise(SyntaxError) do
-      assert_template_result('',  '{% case false %}{% when %}true{% endcase %}', {})     
+      assert_template_result('',  '{% case false %}{% when %}true{% endcase %}', {})
     end
 
     assert_raise(SyntaxError) do
-      assert_template_result('',  '{% case false %}{% huh %}true{% endcase %}', {})     
+      assert_template_result('',  '{% case false %}{% huh %}true{% endcase %}', {})
     end
-    
+
   end
-  
-  
-  
+
+
+
   def test_cycle
 
-    assert_template_result('one','{%cycle &quot;one&quot;, &quot;two&quot;%}')  
-    assert_template_result('one two','{%cycle &quot;one&quot;, &quot;two&quot;%} {%cycle &quot;one&quot;, &quot;two&quot;%}') 
-    
-    assert_template_result('one two one','{%cycle &quot;one&quot;, &quot;two&quot;%} {%cycle &quot;one&quot;, &quot;two&quot;%} {%cycle &quot;one&quot;, &quot;two&quot;%}') 
-    
-    assert_template_result('text-align: left text-align: right','{%cycle &quot;text-align: left&quot;, &quot;text-align: right&quot; %} {%cycle &quot;text-align: left&quot;, &quot;text-align: right&quot;%}') 
-    
+    assert_template_result('one','{%cycle &quot;one&quot;, &quot;two&quot;%}')
+    assert_template_result('one two','{%cycle &quot;one&quot;, &quot;two&quot;%} {%cycle &quot;one&quot;, &quot;two&quot;%}')
+
+    assert_template_result('one two one','{%cycle &quot;one&quot;, &quot;two&quot;%} {%cycle &quot;one&quot;, &quot;two&quot;%} {%cycle &quot;one&quot;, &quot;two&quot;%}')
+
+    assert_template_result('text-align: left text-align: right','{%cycle &quot;text-align: left&quot;, &quot;text-align: right&quot; %} {%cycle &quot;text-align: left&quot;, &quot;text-align: right&quot;%}')
+
   end
-  
+
   def test_multiple_cycles
-    assert_template_result('1 2 1 1 2 3 1','{%cycle 1,2%} {%cycle 1,2%} {%cycle 1,2%} {%cycle 1,2,3%} {%cycle 1,2,3%} {%cycle 1,2,3%} {%cycle 1,2,3%}') 
+    assert_template_result('1 2 1 1 2 3 1','{%cycle 1,2%} {%cycle 1,2%} {%cycle 1,2%} {%cycle 1,2,3%} {%cycle 1,2,3%} {%cycle 1,2,3%} {%cycle 1,2,3%}')
   end
-  
+
   def test_multiple_named_cycles
-    assert_template_result('one one two two one one','{%cycle 1: &quot;one&quot;, &quot;two&quot; %} {%cycle 2: &quot;one&quot;, &quot;two&quot; %} {%cycle 1: &quot;one&quot;, &quot;two&quot; %} {%cycle 2: &quot;one&quot;, &quot;two&quot; %} {%cycle 1: &quot;one&quot;, &quot;two&quot; %} {%cycle 2: &quot;one&quot;, &quot;two&quot; %}') 
+    assert_template_result('one one two two one one','{%cycle 1: &quot;one&quot;, &quot;two&quot; %} {%cycle 2: &quot;one&quot;, &quot;two&quot; %} {%cycle 1: &quot;one&quot;, &quot;two&quot; %} {%cycle 2: &quot;one&quot;, &quot;two&quot; %} {%cycle 1: &quot;one&quot;, &quot;two&quot; %} {%cycle 2: &quot;one&quot;, &quot;two&quot; %}')
   end
-  
+
   def test_multiple_named_cycles_with_names_from_context
     assigns = {&quot;var1&quot; =&gt; 1, &quot;var2&quot; =&gt; 2 }
-    assert_template_result('one one two two one one','{%cycle var1: &quot;one&quot;, &quot;two&quot; %} {%cycle var2: &quot;one&quot;, &quot;two&quot; %} {%cycle var1: &quot;one&quot;, &quot;two&quot; %} {%cycle var2: &quot;one&quot;, &quot;two&quot; %} {%cycle var1: &quot;one&quot;, &quot;two&quot; %} {%cycle var2: &quot;one&quot;, &quot;two&quot; %}', assigns) 
+    assert_template_result('one one two two one one','{%cycle var1: &quot;one&quot;, &quot;two&quot; %} {%cycle var2: &quot;one&quot;, &quot;two&quot; %} {%cycle var1: &quot;one&quot;, &quot;two&quot; %} {%cycle var2: &quot;one&quot;, &quot;two&quot; %} {%cycle var1: &quot;one&quot;, &quot;two&quot; %} {%cycle var2: &quot;one&quot;, &quot;two&quot; %}', assigns)
   end
-  
+
   def test_size_of_array
     assigns = {&quot;array&quot; =&gt; [1,2,3,4]}
-    assert_template_result('array has 4 elements', &quot;array has {{ array.size }} elements&quot;, assigns) 
+    assert_template_result('array has 4 elements', &quot;array has {{ array.size }} elements&quot;, assigns)
   end
 
   def test_size_of_hash
     assigns = {&quot;hash&quot; =&gt; {:a =&gt; 1, :b =&gt; 2, :c=&gt; 3, :d =&gt; 4}}
-    assert_template_result('hash has 4 elements', &quot;hash has {{ hash.size }} elements&quot;, assigns) 
+    assert_template_result('hash has 4 elements', &quot;hash has {{ hash.size }} elements&quot;, assigns)
   end
-  
+
   def test_illegal_symbols
-    assert_template_result('',     '{% if true == empty %}?{% endif %}', {})         
-    assert_template_result('',     '{% if true == null %}?{% endif %}', {})         
-    assert_template_result('',     '{% if empty == true %}?{% endif %}', {})         
-    assert_template_result('',     '{% if null == true %}?{% endif %}', {})         
+    assert_template_result('',     '{% if true == empty %}?{% endif %}', {})
+    assert_template_result('',     '{% if true == null %}?{% endif %}', {})
+    assert_template_result('',     '{% if empty == true %}?{% endif %}', {})
+    assert_template_result('',     '{% if null == true %}?{% endif %}', {})
   end
-  
+
   def test_for_reversed
     assigns = {'array' =&gt; [ 1, 2, 3] }
-    assert_template_result('321','{%for item in array reversed %}{{item}}{%endfor%}',assigns)    
+    assert_template_result('321','{%for item in array reversed %}{{item}}{%endfor%}',assigns)
   end
 
-  
+
   def test_ifchanged
     assigns = {'array' =&gt; [ 1, 1, 2, 2, 3, 3] }
     assert_template_result('123','{%for item in array%}{%ifchanged%}{{item}}{% endifchanged %}{%endfor%}',assigns)</diff>
      <filename>test/standard_tag_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>37580976db0ced024dd7dfc4bef57ac19f5c0faa</id>
    </parent>
  </parents>
  <author>
    <name>Jakub Ku&#378;ma</name>
    <email>qoobaa@gmail.com</email>
  </author>
  <url>http://github.com/tobi/liquid/commit/8d278648455094d82e42a72c1c783d0929ae1b00</url>
  <id>8d278648455094d82e42a72c1c783d0929ae1b00</id>
  <committed-date>2009-04-16T15:33:25-07:00</committed-date>
  <authored-date>2009-04-14T01:05:03-07:00</authored-date>
  <message>Ruby 1.9.1 bugfixes

Signed-off-by: Tobias L&#252;tke &lt;tobi@leetsoft.com&gt;</message>
  <tree>0d31e63cb4d6fcaf906c85835b71c1585be40157</tree>
  <committer>
    <name>Tobias L&#252;tke</name>
    <email>tobi@leetsoft.com</email>
  </committer>
</commit>
