<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -44,9 +44,9 @@ class Mash &lt; Hash
   # convert it to a Mash including recursively
   # descending into arrays and hashes, converting
   # them as well.
-  def initialize(source_hash = nil)
+  def initialize(source_hash = nil, &amp;blk)
     deep_update(source_hash) if source_hash
-    super(nil)
+    super(&amp;blk)
   end
   
   def id #:nodoc:
@@ -65,7 +65,7 @@ class Mash &lt; Hash
     if key.is_a?(Symbol) &amp;&amp; key?(key) 
       self[key] 
     else 
-      super 
+      key ? super : super()
     end 
   end
   
@@ -174,7 +174,7 @@ class Mash &lt; Hash
     elsif key?(method_name)
       self[method_name]
     elsif match = method_name.to_s.match(/^([a-z][a-z0-9A-Z_]+)$/)
-      default
+      default(method_name)
     else
       super
     end</diff>
      <filename>lib/mash.rb</filename>
    </modified>
    <modified>
      <diff>@@ -106,6 +106,13 @@ describe Mash do
       copy.address.object_id.should_not == initial.address.object_id
     end
     
+    it &quot;should accept a default block&quot; do
+      initial = Mash.new { |h,i| h[i] = []}
+      initial.default_proc.should_not be_nil
+      initial.default.should be_nil
+      initial.test.should == []
+      initial.test?.should be_true
+    end
   end
 end
 </diff>
      <filename>spec/mash_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c566221b441c256c64024227b16ac44650dc8fa8</id>
    </parent>
  </parents>
  <author>
    <name>Magnus Holm</name>
    <email>judofyr@gmail.com</email>
  </author>
  <url>http://github.com/mbleigh/mash/commit/e7bd3ecb863ecbabc56b161e78277661edb1b85e</url>
  <id>e7bd3ecb863ecbabc56b161e78277661edb1b85e</id>
  <committed-date>2008-07-22T06:44:46-07:00</committed-date>
  <authored-date>2008-07-22T06:44:46-07:00</authored-date>
  <message>Mash#initialize should accept a default block</message>
  <tree>21c6acbed9fa8140636d4af301326b84d0f67e26</tree>
  <committer>
    <name>Magnus Holm</name>
    <email>judofyr@gmail.com</email>
  </committer>
</commit>
