Skip to content

Commit

Permalink
don't allocate string on hash access
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Apr 30, 2014
1 parent fd92437 commit 5c5c1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/url_for.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def url_options
:_recall => request.symbolized_path_parameters :_recall => request.symbolized_path_parameters
).freeze ).freeze


if (same_origin = _routes.equal?(env["action_dispatch.routes"])) || if (same_origin = _routes.equal?(env["action_dispatch.routes".freeze])) ||
(script_name = env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]) || (script_name = env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]) ||
(original_script_name = env['ORIGINAL_SCRIPT_NAME']) (original_script_name = env['ORIGINAL_SCRIPT_NAME'])


Expand Down

0 comments on commit 5c5c1cc

Please sign in to comment.