aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-23 20:40:21 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-24 09:19:21 -0200
commitd98014cbcb0bf38f4ecd433d945047fc67fccc36 (patch)
treed052b27a045e0d8ce2c9d2b6539f4993c593bf26 /actionpack/lib/action_dispatch/routing/mapper.rb
parent2b64e9b1bde13783ddca55dbf27e36c9c35364b2 (diff)
downloadrails-d98014cbcb0bf38f4ecd433d945047fc67fccc36.tar.gz
rails-d98014cbcb0bf38f4ecd433d945047fc67fccc36.tar.bz2
rails-d98014cbcb0bf38f4ecd433d945047fc67fccc36.zip
Use merge! in some places to avoid creating extra hashes
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 66b7963eaf..ac078174ed 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -152,7 +152,7 @@ module ActionDispatch
end
def conditions
- { :path_info => @path }.merge(constraints).merge(request_method_condition)
+ { :path_info => @path }.merge!(constraints).merge!(request_method_condition)
end
def requirements
@@ -285,7 +285,7 @@ module ActionDispatch
# of most Rails applications, this is beneficial.
def root(options = {})
options = { :to => options } if options.is_a?(String)
- match '/', { :as => :root, :via => :get }.merge(options)
+ match '/', { :as => :root, :via => :get }.merge!(options)
end
# Matches a url pattern to one or more routes. Any symbols in a pattern
@@ -845,7 +845,7 @@ module ActionDispatch
end
def merge_options_scope(parent, child) #:nodoc:
- (parent || {}).except(*override_keys(child)).merge(child)
+ (parent || {}).except(*override_keys(child)).merge!(child)
end
def merge_shallow_scope(parent, child) #:nodoc: