aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-10-14 13:24:26 -0300
committerEmilio Tagua <miloops@gmail.com>2010-11-19 19:08:28 -0300
commitada014929b01af5ce8ca5e6fdd13401bc3c392f5 (patch)
tree758926882e6ca30d137327a22ae3f828a6b594a8 /activerecord
parent301dd3d5143077f95bebd434ca2ad1c80c1b5866 (diff)
downloadrails-ada014929b01af5ce8ca5e6fdd13401bc3c392f5.tar.gz
rails-ada014929b01af5ce8ca5e6fdd13401bc3c392f5.tar.bz2
rails-ada014929b01af5ce8ca5e6fdd13401bc3c392f5.zip
Use ActiveSupport::WeakHash for MRI, JRuby prefers Weakling.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/identity_map.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb
index d7ba1d953c..9f95685816 100644
--- a/activerecord/lib/active_record/identity_map.rb
+++ b/activerecord/lib/active_record/identity_map.rb
@@ -1,3 +1,5 @@
+require "active_support/weak_hash"
+
module ActiveRecord
# = Active Record Identity Map
#
@@ -23,7 +25,7 @@ module ActiveRecord
attr_accessor :enabled
def current
- repositories[current_repository_name] ||= Hash.new { |h,k| h[k] = Weakling::WeakHash.new }
+ repositories[current_repository_name] ||= Hash.new { |h,k| h[k] = ActiveSupport::WeakHash.new }
end
def with_repository(name = :default)