<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -118,7 +118,7 @@ module ActiveRecord
       end
 
       def inspect
-        reload unless loaded?
+        load_target
         @target.inspect
       end
 
@@ -167,7 +167,7 @@ module ActiveRecord
         def with_scope(*args, &amp;block)
           @reflection.klass.send :with_scope, *args, &amp;block
         end
-          
+
       private
         def method_missing(method, *args)
           if load_target</diff>
      <filename>activerecord/lib/active_record/associations/association_proxy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -149,6 +149,12 @@ class AssociationProxyTest &lt; ActiveRecord::TestCase
     assert !david.projects.loaded?
   end
 
+  def test_inspect_does_not_reload_a_not_yet_loaded_target
+    andreas = Developer.new :name =&gt; 'Andreas', :log =&gt; 'new developer added'
+    assert !andreas.audit_logs.loaded?
+    assert_match(/message: &quot;new developer added&quot;/, andreas.audit_logs.inspect)
+  end
+
   def test_save_on_parent_saves_children
     developer = Developer.create :name =&gt; &quot;Bryan&quot;, :salary =&gt; 50_000
     assert_equal 1, developer.reload.audit_logs.size</diff>
      <filename>activerecord/test/cases/associations_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,6 +49,10 @@ class Developer &lt; ActiveRecord::Base
   before_create do |developer|
     developer.audit_logs.build :message =&gt; &quot;Computer created&quot;
   end
+
+  def log=(message)
+    audit_logs.build :message =&gt; message
+  end
 end
 
 class AuditLog &lt; ActiveRecord::Base</diff>
      <filename>activerecord/test/models/developer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2561732a08ae97fa44706a8eca4db147c4a7c286</id>
    </parent>
  </parents>
  <author>
    <name>Andreas Neuhaus</name>
    <login>zargony</login>
    <email>zargony@zargony.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/bcb090c56b842a76397e0ea32f54c942fd11910e</url>
  <id>bcb090c56b842a76397e0ea32f54c942fd11910e</id>
  <committed-date>2008-05-07T22:04:53-07:00</committed-date>
  <authored-date>2008-05-07T22:04:53-07:00</authored-date>
  <message>Calling ActiveRecord#inspect on an unloaded association won't wipe the collection [#9 state:resolved]
Signed-off-by: Joshua Peek &lt;josh@joshpeek.com&gt;</message>
  <tree>2921e7b7b80559f1e20a335da021fdd308993eab</tree>
  <committer>
    <name>Joshua Peek</name>
    <login>josh</login>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
