Skip to content
Browse files

Fix memory leak issue in ActiveRecord scoped_methods

  • Loading branch information...
1 parent 4ccbc5d commit 77697e03353ec06a4b12f42a32d7569797d1eb8f @josh josh committed Nov 6, 2008
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/base.rb
View
3 activerecord/lib/active_record/base.rb
@@ -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:

0 comments on commit 77697e0

Please sign in to comment.
Something went wrong with that request. Please try again.