<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -657,7 +657,7 @@ module God
     
     list.select do |item|
       item =~ Regexp.new(regex)
-    end
+    end.sort_by { |x| x.size }
   end
 end
 </diff>
      <filename>lib/god.rb</filename>
    </modified>
    <modified>
      <diff>@@ -542,11 +542,11 @@ class TestGod &lt; Test::Unit::TestCase
   # pattern_match
   
   def test_pattern_match
-    list = %w{ mongrel-3000 mongrel-3001 fuzed fuzed2 apache mysql}
+    list = %w{ mongrel-3000 mongrel-3001 fuzed22 fuzed fuzed2 apache mysql}
     
     assert_equal %w{ mongrel-3000 }, God.pattern_match('m3000', list)
     assert_equal %w{ mongrel-3001 }, God.pattern_match('m31', list)
-    assert_equal %w{ fuzed fuzed2 }, God.pattern_match('fu', list)
+    assert_equal %w{ fuzed fuzed2 fuzed22}, God.pattern_match('fu', list)
     assert_equal %w{ mysql }, God.pattern_match('sql', list)
   end
 end</diff>
      <filename>test/test_god.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c15b3f9f4874dbdb6faccc47753e5a8fcc4b6657</id>
    </parent>
  </parents>
  <author>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </author>
  <url>http://github.com/mojombo/god/commit/267b59b6bfe2849441b5c732dc7d24552b529cd9</url>
  <id>267b59b6bfe2849441b5c732dc7d24552b529cd9</id>
  <committed-date>2009-07-20T17:07:49-07:00</committed-date>
  <authored-date>2009-07-20T17:07:49-07:00</authored-date>
  <message>order pattern_match results by length of matched string</message>
  <tree>414a54088b8b04419014834b9d52f77570f77cbc</tree>
  <committer>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </committer>
</commit>
