From 22696b5b7cb73bd16d03faff61016416d7bb8867 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Thu, 18 Nov 2010 10:48:58 -0300 Subject: No need to check returned object now that weakhash is gone. --- activerecord/lib/active_record/identity_map.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb index 10d9b59864..5ebe98c5b2 100644 --- a/activerecord/lib/active_record/identity_map.rb +++ b/activerecord/lib/active_record/identity_map.rb @@ -42,11 +42,7 @@ module ActiveRecord end def get(klass, primary_key) - if obj = repository[klass.symbolized_base_class][primary_key] - return obj if obj.id == primary_key && klass == obj.class - end - - nil + repository[klass.symbolized_base_class][primary_key] end def add(record) -- cgit v1.2.3