<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,10 @@
 module Liquid
 
   class Block &lt; Tag
+    IsTag             = /^#{TagStart}/
+    IsVariable        = /^#{VariableStart}/
+    FullToken         = /^#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}$/
+    ContentOfVariable = /^#{VariableStart}(.*)#{VariableEnd}$/
 
     def parse(tokens)
       @nodelist ||= []
@@ -9,8 +13,8 @@ module Liquid
       while token = tokens.shift
 
         case token
-        when /^#{TagStart}/
-          if token =~ /^#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}$/
+        when IsTag
+          if token =~ FullToken
 
             # if we found the proper block delimitor just end parsing here and let the outer block
             # proceed
@@ -30,7 +34,7 @@ module Liquid
           else
             raise SyntaxError, &quot;Tag '#{token}' was not properly terminated with regexp: #{TagEnd.inspect} &quot;
           end
-        when /^#{VariableStart}/
+        when IsVariable
           @nodelist &lt;&lt; create_variable(token)
         when ''
           # pass
@@ -68,7 +72,7 @@ module Liquid
     end
 
     def create_variable(token)
-      token.scan(/^#{VariableStart}(.*)#{VariableEnd}$/) do |content|
+      token.scan(ContentOfVariable) do |content|
         return Variable.new(content.first)
       end
       raise SyntaxError.new(&quot;Variable '#{token}' was not properly terminated with regexp: #{VariableEnd.inspect} &quot;)</diff>
      <filename>lib/liquid/block.rb</filename>
    </modified>
    <modified>
      <diff>@@ -81,7 +81,7 @@ end
   puts 'Success'
   puts
 
-[RubyProf::FlatPrinter, RubyProf::GraphPrinter, RubyProf::GraphHtmlPrinter].each do |klass|
+[RubyProf::FlatPrinter, RubyProf::GraphPrinter, RubyProf::GraphHtmlPrinter, RubyProf::CallTreePrinter].each do |klass|
   filename = (ENV['TMP'] || '/tmp') + (klass.name.include?('Html') ? &quot;/liquid.#{klass.name.downcase}.html&quot; : &quot;/liquid.#{klass.name.downcase}.txt&quot;)
   filename.gsub!(/:+/, '_')
   File.open(filename, &quot;w+&quot;) { |fp| klass.new(results).print(fp) }</diff>
      <filename>performance/shopify.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a65bd76e726c3a4b50a25df8289a77c3945d0b78</id>
    </parent>
  </parents>
  <author>
    <name>Tobias L&#252;tke</name>
    <email>tobi@jadedpixel.com</email>
  </author>
  <url>http://github.com/tobi/liquid/commit/44f35c09900ca6ef817ac4000febc05d946d6ad9</url>
  <id>44f35c09900ca6ef817ac4000febc05d946d6ad9</id>
  <committed-date>2009-06-15T07:33:33-07:00</committed-date>
  <authored-date>2009-06-15T07:33:33-07:00</authored-date>
  <message>Performance improvement for Block parsing. ~ 10% speedup</message>
  <tree>2907ebf388e53b3b3118a83786f9a0a88535f83d</tree>
  <committer>
    <name>Tobias L&#252;tke</name>
    <email>tobi@jadedpixel.com</email>
  </committer>
</commit>
