Permalink
Browse files

don't allocate string on hash access

  • Loading branch information...
1 parent fd92437 commit 5c5c1cc998c2cb9c08daa3f8fbd2d8625e9da6b6 @tenderlove tenderlove committed Apr 30, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/metal/url_for.rb
@@ -30,7 +30,7 @@ def url_options
:_recall => request.symbolized_path_parameters
).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"]) ||
(original_script_name = env['ORIGINAL_SCRIPT_NAME'])

0 comments on commit 5c5c1cc

Please sign in to comment.