<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -249,7 +249,7 @@ module ActionController
       end
 
       def extract_value
-        &quot;#{local_name} = hash[:#{key}] &amp;&amp; hash[:#{key}].collect { |path_component| URI.escape(path_component, ActionController::Routing::Segment::UNSAFE_PCHAR) }.to_param #{&quot;|| #{default.inspect}&quot; if default}&quot;
+        &quot;#{local_name} = hash[:#{key}] &amp;&amp; hash[:#{key}].collect { |path_component| URI.escape(path_component.to_param, ActionController::Routing::Segment::UNSAFE_PCHAR) }.to_param #{&quot;|| #{default.inspect}&quot; if default}&quot;
       end
 
       def default</diff>
      <filename>actionpack/lib/action_controller/routing/segments.rb</filename>
    </modified>
    <modified>
      <diff>@@ -50,6 +50,13 @@ class UriReservedCharactersRoutingTest &lt; Test::Unit::TestCase
                 :additional =&gt; [&quot;add#{@segment}itional-1&quot;, &quot;add#{@segment}itional-2&quot;] }
     assert_equal options, @set.recognize_path(&quot;/controller/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2&quot;)
   end
+
+  def test_route_generation_allows_passing_non_string_values_to_generated_helper
+    assert_equal &quot;/controller/action/variable/1/2&quot;, @set.generate(:controller =&gt; &quot;controller&quot;,
+                                                                  :action =&gt; &quot;action&quot;,
+                                                                  :variable =&gt; &quot;variable&quot;,
+                                                                  :additional =&gt; [1, 2])
+  end
 end
 
 class LegacyRouteSetTests &lt; Test::Unit::TestCase</diff>
      <filename>actionpack/test/controller/routing_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>77f873acf2f1fb4533dfca6b26b965a115ebbc54</id>
    </parent>
  </parents>
  <author>
    <name>Sven Fuchs</name>
    <email>svenfuchs@artweb-design.de</email>
  </author>
  <url>http://github.com/rails/rails/commit/345f030c5b6c0a28ddde56c80a1112b00d345c79</url>
  <id>345f030c5b6c0a28ddde56c80a1112b00d345c79</id>
  <committed-date>2008-05-16T09:36:09-07:00</committed-date>
  <authored-date>2008-05-13T13:04:20-07:00</authored-date>
  <message>Ensure routing generator works with non-string keys. [#172 state:resolved]

Make sure that (with recent correction to globbed parameter escaping) non-string
values can still be passed route generation helpers for globbed route segments.

For example, foo_path([1, 2, 3]) should still work for a route like map.foo &quot;*globbed&quot;
by implicitely calling to_s on the Fixnums.

Signed-off-by: Pratik Naik &lt;pratiknaik@gmail.com&gt;</message>
  <tree>710430c54edfa4c1f145fdad150ea184fc2cc0d1</tree>
  <committer>
    <name>Pratik Naik</name>
    <email>pratiknaik@gmail.com</email>
  </committer>
</commit>
