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:
parent
4ccbc5dffb
commit
77697e0335
1 changed files with 1 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue