aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/identity_map.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-11-18 09:47:32 -0300
committerEmilio Tagua <miloops@gmail.com>2010-11-19 19:08:59 -0300
commit2fd48c8d06d3cb96a95692196cb82e85aadd4631 (patch)
treea06a52f41081cadb4ffecfe195d73003338d930d /activerecord/lib/active_record/identity_map.rb
parent421643bb3de664e1d931a2f5b9801099bd87a9db (diff)
downloadrails-2fd48c8d06d3cb96a95692196cb82e85aadd4631.tar.gz
rails-2fd48c8d06d3cb96a95692196cb82e85aadd4631.tar.bz2
rails-2fd48c8d06d3cb96a95692196cb82e85aadd4631.zip
Revert "Use ActiveSupport::WeakHash for MRI, JRuby prefers Weakling."
This reverts commit 3cddebc2402eb71f2806e8b2119dc3efdceb4662. Conflicts: activerecord/lib/active_record/identity_map.rb activesupport/lib/active_support/weak_hash.rb
Diffstat (limited to 'activerecord/lib/active_record/identity_map.rb')
-rw-r--r--activerecord/lib/active_record/identity_map.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb
index 7adb4e1c71..e38524230b 100644
--- a/activerecord/lib/active_record/identity_map.rb
+++ b/activerecord/lib/active_record/identity_map.rb
@@ -1,5 +1,3 @@
-require "active_support/weak_hash"
-
module ActiveRecord
# = Active Record Identity Map
#
@@ -22,8 +20,8 @@ module ActiveRecord
class << self
attr_accessor :enabled
- def repository
- Thread.current[:identity_map] ||= Hash.new { |h,k| h[k] = ActiveSupport::WeakHash.new }
+ def current
+ Thread.current[:identity_map] ||= Hash.new { |h,k| h[k] = Weakling::WeakHash.new }
end
def use