<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -103,6 +103,12 @@ module Configgy
       map
     end
 
+    def merge(map)
+      rv = dup
+      map.each { |k, v| rv[k] = v }
+      rv
+    end
+
     def to_config_string
       to_config_list.join(&quot;\n&quot;) + &quot;\n&quot;
     end</diff>
      <filename>lib/configgy/config_map.rb</filename>
    </modified>
    <modified>
      <diff>@@ -121,6 +121,16 @@ describe &quot;ConfigMap&quot; do
     t.inspect.should == '{root: age=8 disposition=&quot;hungry&quot; name=&quot;Communist&quot;}'
   end
 
+  it &quot;merges a map&quot; do
+    @map[:name] = &quot;Communist&quot;
+    @map[:age] = 8
+    new_map = @map.merge(:age =&gt; 20, :weight =&gt; 10)
+    @map[:age].should == 8
+    new_map[:age].should == 20
+    new_map[:name].should == &quot;Communist&quot;
+    new_map[:weight].should == 10
+  end
+
   it &quot;creates a config string&quot; do
     @map[:name] = &quot;Sparky&quot;
     @map[:age] = 10</diff>
      <filename>spec/config_map_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>63944777cbb71758c853f0e1d9727579ac84fde9</id>
    </parent>
  </parents>
  <author>
    <name>Robey Pointer</name>
    <email>robey@twitter.com</email>
  </author>
  <url>http://github.com/robey/configgyrb/commit/2641fa4379311ca54263710f0ecf565b32f082e8</url>
  <id>2641fa4379311ca54263710f0ecf565b32f082e8</id>
  <committed-date>2009-11-03T15:34:32-08:00</committed-date>
  <authored-date>2009-11-03T15:34:32-08:00</authored-date>
  <message>support merge.</message>
  <tree>4b1644ab31f855b3befba8aae0ba86fa94ad776f</tree>
  <committer>
    <name>Robey Pointer</name>
    <email>robey@twitter.com</email>
  </committer>
</commit>
