public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Some performance goodness for routing.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
clemens (author)
Tue Sep 02 01:48:00 -0700 2008
jeremy (committer)
Tue Sep 02 15:55:23 -0700 2008
commit  948ed346007f0383c51fd371d594576f0fc9d699
tree    31f492c094045b5fa24bad6ad1f17bf7c3deb52c
parent  ba3ecf53b4902a9a5943f4dcf2073fe413de4778
...
160
161
162
163
 
164
165
166
...
231
232
233
234
 
235
236
237
...
251
252
253
254
 
255
256
257
...
160
161
162
 
163
164
165
166
...
231
232
233
 
234
235
236
237
...
251
252
253
 
254
255
256
257
0
@@ -160,7 +160,7 @@ module ActionController
0
         s << "\n#{expiry_statement}"
0
       end
0
 
0
-      def interpolation_chunk(value_code = "#{local_name}")
0
+      def interpolation_chunk(value_code = local_name)
0
         "\#{URI.escape(#{value_code}.to_s, ActionController::Routing::Segment::UNSAFE_PCHAR)}"
0
       end
0
 
0
@@ -231,7 +231,7 @@ module ActionController
0
       end
0
 
0
       # Don't URI.escape the controller name since it may contain slashes.
0
-      def interpolation_chunk(value_code = "#{local_name}")
0
+      def interpolation_chunk(value_code = local_name)
0
         "\#{#{value_code}.to_s}"
0
       end
0
 
0
@@ -251,7 +251,7 @@ module ActionController
0
     end
0
 
0
     class PathSegment < DynamicSegment #:nodoc:
0
-      def interpolation_chunk(value_code = "#{local_name}")
0
+      def interpolation_chunk(value_code = local_name)
0
         "\#{#{value_code}}"
0
       end
0
 

Comments