public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Fix memory leak issue in ActiveRecord scoped_methods
josh (author)
Thu Nov 06 15:10:16 -0800 2008
commit  77697e03353ec06a4b12f42a32d7569797d1eb8f
tree    6fe28cac1c4424321167762412f3737016bc96f9
parent  4ccbc5dffb980edf35be899889f9e227dbd426c7
...
2023
2024
2025
2026
2027
 
2028
2029
2030
...
2023
2024
2025
 
 
2026
2027
2028
2029
0
@@ -2023,8 +2023,7 @@ module ActiveRecord #:nodoc:
0
         end
0
 
0
         def scoped_methods #:nodoc:
0
-          scoped_methods = (Thread.current[:scoped_methods] ||= {})
0
-          scoped_methods[self] ||= []
0
+          Thread.current[:"#{self}_scoped_methods"] ||= []
0
         end
0
 
0
         def current_scoped_methods #:nodoc:

Comments