<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,19 +1,19 @@
 module Liquid
-  
+
   class Block &lt; Tag
 
     def parse(tokens)
       @nodelist ||= []
       @nodelist.clear
 
-      while token = tokens.shift 
+      while token = tokens.shift
 
         case token
-        when /^#{TagStart}/                   
+        when /^#{TagStart}/
           if token =~ /^#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}$/
 
             # if we found the proper block delimitor just end parsing here and let the outer block
-            # proceed                               
+            # proceed
             if block_delimiter == $1
               end_tag
               return
@@ -23,10 +23,10 @@ module Liquid
             if tag = Template.tags[$1]
               @nodelist &lt;&lt; tag.new($1, $2, tokens)
             else
-              # this tag is not registered with the system 
+              # this tag is not registered with the system
               # pass it to the current block for special handling or error reporting
               unknown_tag($1, $2, tokens)
-            end              
+            end
           else
             raise SyntaxError, &quot;Tag '#{token}' was not properly terminated with regexp: #{TagEnd.inspect} &quot;
           end
@@ -37,19 +37,19 @@ module Liquid
         else
           @nodelist &lt;&lt; token
         end
-      end       
-      
-      # Make sure that its ok to end parsing in the current block. 
-      # Effectively this method will throw and exception unless the current block is 
-      # of type Document 
+      end
+
+      # Make sure that its ok to end parsing in the current block.
+      # Effectively this method will throw and exception unless the current block is
+      # of type Document
       assert_missing_delimitation!
-    end                     
-    
-    def end_tag      
+    end
+
+    def end_tag
     end
 
     def unknown_tag(tag, params, tokens)
-      case tag 
+      case tag
       when 'else'
         raise SyntaxError, &quot;#{block_name} tag does not expect else tag&quot;
       when 'end'
@@ -61,7 +61,7 @@ module Liquid
 
     def block_delimiter
       &quot;end#{block_name}&quot;
-    end                           
+    end
 
     def block_name
       @tag_name
@@ -77,7 +77,7 @@ module Liquid
     def render(context)
       render_all(@nodelist, context)
     end
-    
+
     protected
 
     def assert_missing_delimitation!
@@ -86,12 +86,12 @@ module Liquid
 
     def render_all(list, context)
       list.collect do |token|
-        begin        
+        begin
           token.respond_to?(:render) ? token.render(context) : token
-        rescue Exception =&gt; e          
+        rescue Exception =&gt; e
           context.handle_error(e)
-        end          
-      end      
+        end
+      end
     end
-  end  
-end
\ No newline at end of file
+  end
+end</diff>
      <filename>lib/liquid/block.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,17 @@
 module Liquid
-  class Document &lt; Block                                                             
+  class Document &lt; Block
     # we don't need markup to open this block
     def initialize(tokens)
       parse(tokens)
-    end                                                                        
-  
-    # There isn't a real delimter   
+    end
+
+    # There isn't a real delimter
     def block_delimiter
       []
     end
-  
+
     # Document blocks don't need to be terminated since they are not actually opened
     def assert_missing_delimitation!
-    end    
+    end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/liquid/document.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module Liquid
-  class TableRow &lt; Block                                             
-    Syntax = /(\w+)\s+in\s+(#{VariableSignature}+)/   
-    
+  class TableRow &lt; Block
+    Syntax = /(\w+)\s+in\s+(#{VariableSignature}+)/
+
     def initialize(tag_name, markup, tokens)
       if markup =~ Syntax
         @variable_name = $1
@@ -13,62 +13,62 @@ module Liquid
       else
         raise SyntaxError.new(&quot;Syntax Error in 'table_row loop' - Valid syntax: table_row [item] in [collection] cols=3&quot;)
       end
-      
-      super      
+
+      super
     end
-    
-    def render(context)        
+
+    def render(context)
       collection = context[@collection_name] or return ''
-      
+
       if @attributes['limit'] or @attributes['offset']
         limit = context[@attributes['limit']] || -1
         offset = context[@attributes['offset']] || 0
         collection = collection[offset.to_i..(limit.to_i + offset.to_i - 1)]
       end
-            
+
       length = collection.length
-      
+
       cols = context[@attributes['cols']].to_i
 
       row = 1
       col = 0
 
       result = [&quot;&lt;tr class=\&quot;row1\&quot;&gt;\n&quot;]
-      context.stack do 
+      context.stack do
 
         collection.each_with_index do |item, index|
           context[@variable_name] = item
           context['tablerowloop'] = {
             'length'  =&gt; length,
-            'index'   =&gt; index + 1, 
-            'index0'  =&gt; index, 
-            'col'     =&gt; col + 1, 
-            'col0'    =&gt; col, 
-            'index0'  =&gt; index, 
+            'index'   =&gt; index + 1,
+            'index0'  =&gt; index,
+            'col'     =&gt; col + 1,
+            'col0'    =&gt; col,
+            'index0'  =&gt; index,
             'rindex'  =&gt; length - index,
             'rindex0' =&gt; length - index -1,
             'first'   =&gt; (index == 0),
             'last'    =&gt; (index == length - 1),
             'col_first' =&gt; (col == 0),
             'col_last'  =&gt; (col == cols - 1)
-          }  
-          
-            
+          }
+
+
           col += 1
-                                
+
           result &lt;&lt; [&quot;&lt;td class=\&quot;col#{col}\&quot;&gt;&quot;] + render_all(@nodelist, context) + ['&lt;/td&gt;']
 
-          if col == cols and not (index == length - 1)                        
+          if col == cols and not (index == length - 1)
             col  = 0
             row += 1
-            result &lt;&lt; [&quot;&lt;/tr&gt;\n&lt;tr class=\&quot;row#{row}\&quot;&gt;&quot;] 
+            result &lt;&lt; [&quot;&lt;/tr&gt;\n&lt;tr class=\&quot;row#{row}\&quot;&gt;&quot;]
           end
-          
+
         end
       end
       result + [&quot;&lt;/tr&gt;\n&quot;]
-    end    
+    end
   end
-  
-  Template.register_tag('tablerow', TableRow)  
-end
\ No newline at end of file
+
+  Template.register_tag('tablerow', TableRow)
+end</diff>
      <filename>lib/liquid/htmltags.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
 #   end
 # end
 #
-# if you want to extend the drop to other methods you can defines more methods 
+# if you want to extend the drop to other methods you can defines more methods
 # in the class &lt;YourClass&gt;::LiquidDropClass
 #
 #   class SomeClass::LiquidDropClass
@@ -37,11 +37,11 @@
 # output:
 # 'this comes from an allowed method and this from another allowed method'
 #
-# You can also chain associations, by adding the liquid_method call in the 
+# You can also chain associations, by adding the liquid_method call in the
 # association models.
 #
 class Module
-  
+
   def liquid_methods(*allowed_methods)
     drop_class = eval &quot;class #{self.to_s}::LiquidDropClass &lt; Liquid::Drop; self; end&quot;
     define_method :to_liquid do
@@ -58,5 +58,5 @@ class Module
       end
     end
   end
-  
+
 end</diff>
      <filename>lib/liquid/module_ex.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ module Liquid
   # One of the strainer's responsibilities is to keep malicious method calls out
   class Strainer &lt; parent_object #:nodoc:
     INTERNAL_METHOD = /^__/
-    @@required_methods = Set.new([:__send__, :respond_to?, :extend, :methods, :class, :object_id])
+    @@required_methods = Set.new([:__id__, :__send__, :respond_to?, :extend, :methods, :class, :object_id])
 
     @@filters = {}
 </diff>
      <filename>lib/liquid/strainer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,26 @@
 module Liquid
-  
+
   class Tag
     attr_accessor :nodelist
-    
+
     def initialize(tag_name, markup, tokens)
       @tag_name   = tag_name
       @markup     = markup
       parse(tokens)
     end
-    
+
     def parse(tokens)
     end
-    
+
     def name
       self.class.name.downcase
     end
-        
+
     def render(context)
       ''
-    end    
+    end
   end
-   
+
 
 end
-   
\ No newline at end of file
+</diff>
      <filename>lib/liquid/tag.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module Liquid
-  
+
   # Capture stores the result of a block into a variable without rendering it inplace.
   #
   #   {% capture heading %}
@@ -8,28 +8,28 @@ module Liquid
   #   ...
   #   &lt;h1&gt;{{ monkeys }}&lt;/h1&gt;
   #
-  # Capture is useful for saving content for use later in your template, such as 
+  # Capture is useful for saving content for use later in your template, such as
   # in a sidebar or footer.
   #
   class Capture &lt; Block
     Syntax = /(\w+)/
 
-    def initialize(tag_name, markup, tokens)      
+    def initialize(tag_name, markup, tokens)
       if markup =~ Syntax
         @to = $1
       else
         raise SyntaxError.new(&quot;Syntax Error in 'capture' - Valid syntax: capture [var]&quot;)
       end
-      
-      super       
+
+      super
     end
 
     def render(context)
       output = super
-      context[@to] = output.to_s
+      context[@to] = output.join
       ''
     end
-  end  
-  
+  end
+
   Template.register_tag('capture', Capture)
-end
\ No newline at end of file
+end</diff>
      <filename>lib/liquid/tags/capture.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,120 +1,120 @@
 module Liquid
 
-  # Templates are central to liquid. 
-  # Interpretating templates is a two step process. First you compile the 
-  # source code you got. During compile time some extensive error checking is performed. 
-  # your code should expect to get some SyntaxErrors. 
+  # Templates are central to liquid.
+  # Interpretating templates is a two step process. First you compile the
+  # source code you got. During compile time some extensive error checking is performed.
+  # your code should expect to get some SyntaxErrors.
   #
-  # After you have a compiled template you can then &lt;tt&gt;render&lt;/tt&gt; it. 
-  # You can use a compiled template over and over again and keep it cached. 
+  # After you have a compiled template you can then &lt;tt&gt;render&lt;/tt&gt; it.
+  # You can use a compiled template over and over again and keep it cached.
+  #
+  # Example:
   #
-  # Example: 
-  #   
   #   template = Liquid::Template.parse(source)
   #   template.render('user_name' =&gt; 'bob')
   #
   class Template
     attr_accessor :root
     @@file_system = BlankFileSystem.new
-    
-    class &lt;&lt;self
+
+    class &lt;&lt; self
       def file_system
         @@file_system
       end
-    
+
       def file_system=(obj)
         @@file_system = obj
       end
-          
-      def register_tag(name, klass)      
+
+      def register_tag(name, klass)
         tags[name.to_s] = klass
-      end                        
-    
+      end
+
       def tags
         @tags ||= {}
       end
-        
-      # Pass a module with filter methods which should be available 
+
+      # Pass a module with filter methods which should be available
       # to all liquid views. Good for registering the standard library
-      def register_filter(mod)      
+      def register_filter(mod)
         Strainer.global_filter(mod)
-      end                        
-            
+      end
+
       # creates a new &lt;tt&gt;Template&lt;/tt&gt; object from liquid source code
       def parse(source)
         template = Template.new
         template.parse(source)
         template
-      end                           
+      end
     end
 
     # creates a new &lt;tt&gt;Template&lt;/tt&gt; from an array of tokens. Use &lt;tt&gt;Template.parse&lt;/tt&gt; instead
     def initialize
     end
-    
-    # Parse source code. 
-    # Returns self for easy chaining    
+
+    # Parse source code.
+    # Returns self for easy chaining
     def parse(source)
       @root = Document.new(tokenize(source))
       self
     end
-    
-    def registers 
+
+    def registers
       @registers ||= {}
     end
-    
+
     def assigns
       @assigns ||= {}
     end
-    
+
     def errors
       @errors ||= []
     end
-        
+
     # Render takes a hash with local variables.
     #
-    # if you use the same filters over and over again consider registering them globally 
+    # if you use the same filters over and over again consider registering them globally
     # with &lt;tt&gt;Template.register_filter&lt;/tt&gt;
-    # 
+    #
     # Following options can be passed:
-    #  
+    #
     #  * &lt;tt&gt;filters&lt;/tt&gt; : array with local filters
-    #  * &lt;tt&gt;registers&lt;/tt&gt; : hash with register variables. Those can be accessed from 
-    #    filters and tags and might be useful to integrate liquid more with its host application  
+    #  * &lt;tt&gt;registers&lt;/tt&gt; : hash with register variables. Those can be accessed from
+    #    filters and tags and might be useful to integrate liquid more with its host application
     #
     def render(*args)
-      return '' if @root.nil?                          
+      return '' if @root.nil?
 
       context = case args.first
       when Liquid::Context
         args.shift
       when Hash
-        self.assigns.merge!(args.shift)        
+        self.assigns.merge!(args.shift)
         Context.new(assigns, registers, @rethrow_errors)
       when nil
         Context.new(assigns, registers, @rethrow_errors)
       else
         raise ArgumentError, &quot;Expect Hash or Liquid::Context as parameter&quot;
       end
-      
+
       case args.last
       when Hash
         options = args.pop
-        
+
         if options[:registers].is_a?(Hash)
-          self.registers.merge!(options[:registers])  
+          self.registers.merge!(options[:registers])
         end
 
         if options[:filters]
           context.add_filters(options[:filters])
-        end                         
-        
+        end
+
       when Module
-        context.add_filters(args.pop)    
+        context.add_filters(args.pop)
       when Array
-        context.add_filters(args.pop)            
+        context.add_filters(args.pop)
       end
-                                                            
+
       begin
         # render the nodelist.
         # for performance reasons we get a array back here. join will make a string out of it
@@ -123,24 +123,24 @@ module Liquid
         @errors = context.errors
       end
     end
-    
+
     def render!(*args)
       @rethrow_errors = true; render(*args)
     end
-       
+
     private
-    
+
     # Uses the &lt;tt&gt;Liquid::TemplateParser&lt;/tt&gt; regexp to tokenize the passed source
     def tokenize(source)
-      source = source.source if source.respond_to?(:source)      
+      source = source.source if source.respond_to?(:source)
       return [] if source.to_s.empty?
       tokens = source.split(TemplateParser)
 
       # removes the rogue empty element at the beginning of the array
-      tokens.shift if tokens[0] and tokens[0].empty? 
+      tokens.shift if tokens[0] and tokens[0].empty?
 
       tokens
     end
-     
-  end  
+
+  end
 end</diff>
      <filename>lib/liquid/template.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8d278648455094d82e42a72c1c783d0929ae1b00</id>
    </parent>
  </parents>
  <author>
    <name>Jakub Ku&#378;ma</name>
    <email>qoobaa@gmail.com</email>
  </author>
  <url>http://github.com/tobi/liquid/commit/ed1b542abf73d1d7c1885ee158410c6575a95668</url>
  <id>ed1b542abf73d1d7c1885ee158410c6575a95668</id>
  <committed-date>2009-04-16T15:33:28-07:00</committed-date>
  <authored-date>2009-04-14T01:30:08-07:00</authored-date>
  <message>All tests pass on Ruby 1.9.1

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