aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/routing.rb6
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)