From 045cdd3a3d50b06019361cf7bec57f2521facff6 Mon Sep 17 00:00:00 2001 From: schneems Date: Sat, 25 Jul 2015 00:30:43 -0500 Subject: Freeze a string in comparator Saves 888 string objects per request. --- actionpack/lib/action_dispatch/routing/route_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index d93989a449..84aeb65007 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -680,7 +680,7 @@ module ActionDispatch # Move 'index' action from options to recall def normalize_action! - if @options[:action] == 'index' + if @options[:action] == 'index'.freeze @recall[:action] = @options.delete(:action) end end -- cgit v1.2.3