<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,12 +2,12 @@ require File.expand_path('../test_helper', __FILE__)
 
 describe &quot;Array#take_and_map&quot; do
   before do
-    @array = %w{ foo bar baz }
+    @array = %w{ foo bar baz foo/bar.baz foo/bar/baz }
   end
   
   it &quot;should remove elements from the array for which the block evaluates to true&quot; do
     @array.take_and_map { |x| x =~ /^ba/ }
-    @array.should == %w{ foo }
+    @array.should == %w{ foo foo/bar.baz foo/bar/baz }
   end
   
   it &quot;should return a new array of the return values of each block call that evaluates to true&quot; do
@@ -21,8 +21,18 @@ describe &quot;Array#take_and_map&quot; do
   end
   
   it &quot;should not flatten and compact the result array if specified&quot; do
-    @array.take_and_map(false) do |x|
+    @array.take_and_map(nil, false) do |x|
       x =~ /^ba/ ? %w{ f o o } : [nil]
-    end.should == [[nil], %w{ f o o }, %w{ f o o }]
+    end.should == [[nil], %w{ f o o }, %w{ f o o }, [nil], [nil]]
   end
-end
\ No newline at end of file
+  
+  it &quot;should take only files matching the pattern&quot; do
+    @array.take_and_map('**/*') { |x| x.reverse }.should ==
+      %w{ foo/bar.baz foo/bar/baz }.map { |s| s.reverse }
+  end
+  
+  it &quot;should not remove files not matching the pattern&quot; do
+    @array.take_and_map('**/*') { |x| x }
+    @array.should == %w{ foo bar baz }
+  end
+end</diff>
      <filename>test/core_ext_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2f7a823b4904c30b724a9c0861159482da13b5f0</id>
    </parent>
    <parent>
      <id>6cf51d8f8dd15ec9ad2281397e06a1fa7d0fc6df</id>
    </parent>
  </parents>
  <author>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </author>
  <url>http://github.com/alloy/kicker/commit/01e6fd31855d8a2f7979f911ed1949f03dfd4ad4</url>
  <id>01e6fd31855d8a2f7979f911ed1949f03dfd4ad4</id>
  <committed-date>2009-11-05T01:49:20-08:00</committed-date>
  <authored-date>2009-11-05T01:49:20-08:00</authored-date>
  <message>Merge branch 'master' of github.com:alloy/kicker</message>
  <tree>aa4946be3dd44c1c16c32cf5375129a7cac1db20</tree>
  <committer>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </committer>
</commit>
