1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix memory leak issue in ActiveRecord scoped_methods

This commit is contained in:
Joshua Peek 2008-11-06 17:10:16 -06:00
parent 4ccbc5dffb
commit 77697e0335

View file

@ -2023,8 +2023,7 @@ module ActiveRecord #:nodoc:
end end
def scoped_methods #:nodoc: def scoped_methods #:nodoc:
scoped_methods = (Thread.current[:scoped_methods] ||= {}) Thread.current[:"#{self}_scoped_methods"] ||= []
scoped_methods[self] ||= []
end end
def current_scoped_methods #:nodoc: def current_scoped_methods #:nodoc: