提交 77697e03 编写于 作者: J Joshua Peek

Fix memory leak issue in ActiveRecord scoped_methods

上级 4ccbc5df
......@@ -2023,8 +2023,7 @@ def scope(method, key = nil) #: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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册