In response to #6765, this patch fixes the behavior of arrays for url_for. As detailed in the ticket, arrays normally would be converted to slashed strings (i.e., "1/2/3") rather than their proper conversion through to_param(i.e., "array[]=1&array[]=2&array[]=3"). The logic is there in the build_query_string method, but all the arrays were strings by the time they got there, so it never got used.
The problem with a simple little patch was that a route can have an array option named path that allows someone to give an array as the route's named path. For example:
map.connect :controller => 'content', :action => 'show_file', :path => %w(pages boo)
This patch simply checks to see if the option's key is path and its class Array; if so, it converts it using the slash method. Otherwise, if it's an Array, it simply adds it to the hash and lets the build_query_string properly convert it. Other types still behave as they did before.
Test case is included.