<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,10 +24,13 @@ module DelegateTemporal
       attribute_names.each do |attribute_name|
         attribute_keys_to_delegate += new_attributes.keys.find_all { |key| key.to_s =~ /^#{attribute_name}(\(.+\))?$/ }
       end
-      send(to).attributes = attribute_keys_to_delegate.inject({}) do |mem, key|
+      
+      attributes_to_delegate = attribute_keys_to_delegate.inject({}) do |mem, key|
         mem[key] = new_attributes.delete(key)
         mem
       end
+      
+      send(to).attributes = attributes_to_delegate unless attributes_to_delegate.empty?
     end
     self.attributes_without_temporal_delegation = new_attributes
   end</diff>
      <filename>lib/delegate_temporal.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,4 +30,11 @@ describe &quot;An object with a temporal delegation of its 'start_time' to an 'appoin
     
     @object.attributes = attrs
   end
+  
+  it &quot;should call the apppointment's attributes= method if there are no parameters which need to be delegated&quot; do
+    @appointment.expects(:attributes=).never
+    @object.expects(:dont_delegate=).with(&quot;this&quot;)
+    
+    @object.attributes = { :dont_delegate =&gt; &quot;this&quot; }
+  end
 end</diff>
      <filename>spec/delegate_temporal_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>77702954f51721a6cb8219b3c31fd73eebaa1045</id>
    </parent>
  </parents>
  <author>
    <name>Jon Leighton</name>
    <email>j@jonathanleighton.com</email>
  </author>
  <url>http://github.com/jonleighton/delegate_temporal/commit/39bdcad1c20a08eb9b16552a5aa40d3ccb697191</url>
  <id>39bdcad1c20a08eb9b16552a5aa40d3ccb697191</id>
  <committed-date>2008-09-11T04:33:56-07:00</committed-date>
  <authored-date>2008-09-11T04:33:56-07:00</authored-date>
  <message>Don't assign an empty hash to the attributes of the delegate object (in the case that there are no parameters to delegate)</message>
  <tree>676853fb4208c805a6ad4ecc7a3ff0c1063671d4</tree>
  <committer>
    <name>Jon Leighton</name>
    <email>j@jonathanleighton.com</email>
  </committer>
</commit>
