aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-11-06 17:10:16 -0600
committerJoshua Peek <josh@joshpeek.com>2008-11-06 17:10:16 -0600
commit77697e03353ec06a4b12f42a32d7569797d1eb8f (patch)
tree6fe28cac1c4424321167762412f3737016bc96f9 /activerecord/lib/active_record
parent4ccbc5dffb980edf35be899889f9e227dbd426c7 (diff)
downloadrails-77697e03353ec06a4b12f42a32d7569797d1eb8f.tar.gz
rails-77697e03353ec06a4b12f42a32d7569797d1eb8f.tar.bz2
rails-77697e03353ec06a4b12f42a32d7569797d1eb8f.zip
Fix memory leak issue in ActiveRecord scoped_methods
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/base.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index a36a137f0d..757102eb6b 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -2023,8 +2023,7 @@ module ActiveRecord #:nodoc:
end
def scoped_methods #:nodoc:
- scoped_methods = (Thread.current[:scoped_methods] ||= {})
- scoped_methods[self] ||= []
+ Thread.current[:"#{self}_scoped_methods"] ||= []
end
def current_scoped_methods #:nodoc: