aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-02-18 01:02:29 +0000
committerMichael Koziarski <michael@koziarski.com>2008-02-18 01:02:29 +0000
commitcae1d960d294e4e910895f4a25b6e5a59e91d492 (patch)
tree9ed3c39611682468cb8a7a20b656ef3cb51b9115 /actionpack
parentdb4f421b0bfae226005591b1da90e4b42edf178d (diff)
downloadrails-cae1d960d294e4e910895f4a25b6e5a59e91d492.tar.gz
rails-cae1d960d294e4e910895f4a25b6e5a59e91d492.tar.bz2
rails-cae1d960d294e4e910895f4a25b6e5a59e91d492.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
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