rails/rails — pull request #6138 by bogdan (2012-05-03 08:45:28+00:00)
Title: RouteSet: remove some code dups

Remove some code dups.

Ensure no performance degrade (probably compiler optimization saved our souls):

https://gist.github.com/2584434

```

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

user system total real
------------------------------------------------draw routes
After patch: 0.300000 0.010000 0.310000 ( 0.310616)
Before patch: 0.300000 0.000000 0.300000 ( 0.311043)

--------------------------------------simple URL generation
After patch: 0.010000 0.000000 0.010000 ( 0.006107)
Before patch: 0.010000 0.000000 0.010000 ( 0.006176)

-------------------------URL generation with params as hash
After patch: 0.080000 0.000000 0.080000 ( 0.075196)
Before patch: 0.070000 0.010000 0.080000 ( 0.075134)

-------------------------------URL generation with globbing
After patch: 0.070000 0.000000 0.070000 ( 0.077017)
Before patch: 0.080000 0.000000 0.080000 ( 0.077661)