diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-11-17 22:29:02 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-11-17 22:29:02 +0000 |
commit | f92d6a07d0d01226fb80c82608d332843c01f2d6 (patch) | |
tree | 85cf921498269163d2e9911122d5a97a0284fe47 /actionpack/lib | |
parent | 44e6aa7e19928f401e8728ddc2f4d7f6e3d6e105 (diff) | |
download | rails-f92d6a07d0d01226fb80c82608d332843c01f2d6.tar.gz rails-f92d6a07d0d01226fb80c82608d332843c01f2d6.tar.bz2 rails-f92d6a07d0d01226fb80c82608d332843c01f2d6.zip |
Reuse named route helper module between Routing reloads to prevent memory leaks.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 35eec734d3..3c53acc164 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -996,7 +996,11 @@ module ActionController def clear! @routes = {} @helpers = [] - @module = Module.new + + @module ||= Module.new + @module.instance_methods.each do |selector| + @module.send :remove_method, selector + end end def add(name, route) |