Skip to content
Browse files

just clear the caches on clear! rather than replacing. fixes #10251

  • Loading branch information...
1 parent 03d071d commit ba12ef6ae15208a608733a06b78940ef92f305b8 @tenderlove tenderlove committed
Showing with 4 additions and 8 deletions.
  1. +4 −8 actionpack/lib/action_dispatch/routing/route_set.rb
View
12 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -97,9 +97,7 @@ def initialize
@routes = {}
@helpers = []
- @module = Module.new do
- instance_methods.each { |selector| remove_method(selector) }
- end
+ @module = Module.new
end
def helper_names
@@ -108,13 +106,11 @@ def helper_names
def clear!
@helpers.each do |helper|
- @module.module_eval do
- remove_possible_method helper
- end
+ @module.remove_possible_method helper
end
- @routes = {}
- @helpers = []
+ @routes.clear
+ @helpers.clear
end
def add(name, route)

0 comments on commit ba12ef6

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