rails/rails — pull request #6003 by nbeloglazov (2012-04-26 18:34:40+00:00)
Title: Fix side effect on strings in url_for

`url_for` method changes that passed to the method. Example:

controller = '/projects'
url_for {:controller => controller, :action => 'status'}
puts 'Side effect!' if controller == 'projects'

I suppose `url_for` shouldn't change any arguments it takes.
Controller is changed in `action_dispatch/routing/route_set.rb line 490`:

controller.sub!(%r{^/}, '') if controller