Permalink
Browse files

Merge pull request #2503 from arunagw/cant_dup_on_nil

We cannot dup on nil.
  • Loading branch information...
2 parents d1f1b04 + 8196c84 commit c420ebf74a70e40efdfe8e8860e582fbb7dc9d13 @tenderlove tenderlove committed Aug 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/url_for.rb
@@ -140,7 +140,7 @@ def url_for(options = nil)
when String
options
when nil, Hash
- _routes.url_for((options.dup || {}).reverse_merge!(url_options).symbolize_keys)
+ _routes.url_for((options || {}).reverse_merge(url_options).symbolize_keys)
else
polymorphic_url(options)
end

0 comments on commit c420ebf

Please sign in to comment.