From b3d73e789cc8616fad30621e96f872bfd86ee099 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 13 Aug 2015 14:19:58 -0700 Subject: [PATCH] remove default arguments that aren't used we always pass all parameters, so there is no reason to provide default arguments. --- actionpack/lib/action_dispatch/routing/route_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 2fe61c7aa6..35f1653a49 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -514,7 +514,7 @@ def empty? routes.empty? end - def add_route(app, conditions = {}, requirements = {}, defaults = {}, name = nil, anchor = true) + def add_route(app, conditions, requirements, defaults, name, anchor) raise ArgumentError, "Invalid route name: '#{name}'" unless name.blank? || name.to_s.match(/^[_a-z]\w*$/i) if name && named_routes[name] -- GitLab