diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-11-06 17:10:16 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-11-06 17:10:16 -0600 |
commit | 77697e03353ec06a4b12f42a32d7569797d1eb8f (patch) | |
tree | 6fe28cac1c4424321167762412f3737016bc96f9 /activerecord | |
parent | 4ccbc5dffb980edf35be899889f9e227dbd426c7 (diff) | |
download | rails-77697e03353ec06a4b12f42a32d7569797d1eb8f.tar.gz rails-77697e03353ec06a4b12f42a32d7569797d1eb8f.tar.bz2 rails-77697e03353ec06a4b12f42a32d7569797d1eb8f.zip |
Fix memory leak issue in ActiveRecord scoped_methods
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 3 |
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: |