From c93bad207087ab656b27c559012b5e8eb31ed20d Mon Sep 17 00:00:00 2001 From: Alberto Almagro Date: Sun, 2 Dec 2018 18:10:03 +0100 Subject: Remove unnecessary variable route The variable `route` was only allocated to hold an object that was immediately returned. This patch removes that variable. --- actionpack/lib/action_dispatch/routing/mapper.rb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 421e2023c2..d67044b4ac 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -160,17 +160,8 @@ module ActionDispatch end def make_route(name, precedence) - route = Journey::Route.new(name, - application, - path, - conditions, - required_defaults, - defaults, - request_method, - precedence, - @internal) - - route + Journey::Route.new(name, application, path, conditions, required_defaults, + defaults, request_method, precedence, @internal) end def application -- cgit v1.2.3