Permalink
Browse files

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
  • Loading branch information...
1 parent db4f421 commit cae1d960d294e4e910895f4a25b6e5a59e91d492 @NZKoz NZKoz committed Feb 18, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -485,7 +485,7 @@ def compute_asset_host(source)
host.call(source)
end
else
- host % (source.hash % 4)
+ (host =~ /%d/) ? host % (source.hash % 4) : host
end
end
end

0 comments on commit cae1d96

Please sign in to comment.