From 6361d4234ca7f7c2dcb98e6ed34187d2933b56d7 Mon Sep 17 00:00:00 2001 From: Paul Gillard Date: Tue, 6 Oct 2009 16:25:51 -0500 Subject: Call initialize_copy when cloning [#3164 state:resolved] Cloned AR objects are now instantiated through initialize_copy rather than new/initialize. This allows AR classes to override initialize_copy in order to implement deep cloning. Signed-off-by: Joshua Peek --- activerecord/test/cases/base_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/base_test.rb') diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 8421a8fb07..1e2d903492 100755 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1352,7 +1352,7 @@ class BasicsTest < ActiveRecord::TestCase cloned_topic.title["a"] = "c" assert_equal "b", topic.title["a"] - #test if attributes set as part of after_initialize are cloned correctly + # test if attributes set as part of after_initialize are cloned correctly assert_equal topic.author_email_address, cloned_topic.author_email_address # test if saved clone object differs from original -- cgit v1.2.3