This patch fixes behaviour described in http://dev.rubyonrails.org/ticket/7047 and makes it possible to unclude hashes (and recursive hashes with arrays too) into url options.
build_query_string() was refactored and to_param() call was moved from options_as_params() to DymanicSegment::extract_value.
As I can imagine, to_param conversion on raw options-hash, done in options_as_params() is too early and blocks build_query_string() from doing its work. This patch considers that value conversion is a responsibility of corresponding segments and query options that don't have their segments. PathSegment, being a descendant of DynamicSegment, gets its array to_param'ed too.
test cases included