From 2e95d2ef90a32a7ed6fbb14f4e0a6764fc9e017b Mon Sep 17 00:00:00 2001 From: schneems Date: Fri, 24 Jul 2015 23:41:25 -0500 Subject: Optimize hash key No idea why on earth this hash key isn't already optimized by MRI, but it isn't. :shit: This change buys us 74,077 bytes of memory and 1,852 fewer objects per request. --- actionview/lib/action_view/helpers/url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/lib/action_view') diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index 7d92651183..5eb1377d38 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -184,7 +184,7 @@ module ActionView html_options = convert_options_to_data_attributes(options, html_options) url = url_for(options) - html_options['href'] ||= url + html_options["href".freeze] ||= url content_tag(:a, name || url, html_options, &block) end -- cgit v1.2.3