From cae1d960d294e4e910895f4a25b6e5a59e91d492 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 18 Feb 2008 01:02:29 +0000 Subject: Check the host string contains %d before using String#%, this avoids warnings. Closes #10809 [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 883cd31373..c155a733a7 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -485,7 +485,7 @@ module ActionView host.call(source) end else - host % (source.hash % 4) + (host =~ /%d/) ? host % (source.hash % 4) : host end end end -- cgit v1.2.3