aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-10 13:16:14 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-10 13:24:35 -0700
commitd4e1a75918049f269803fa6d3c77ae5da8a04f59 (patch)
tree50b176cee58567da55cc8b3dc9ba120ca30ae02c
parent44a7fe673ab54619661df3893ed69b95ba02315f (diff)
downloadrails-d4e1a75918049f269803fa6d3c77ae5da8a04f59.tar.gz
rails-d4e1a75918049f269803fa6d3c77ae5da8a04f59.tar.bz2
rails-d4e1a75918049f269803fa6d3c77ae5da8a04f59.zip
reuse the same frame so we don't need a singleton hash
We just want to augment the scope level, not the frame itself, so just copy the frame to the new scope object.
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 9b52598648..4606cc3db2 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1974,9 +1974,8 @@ module ActionDispatch
self.class.new hash, self, scope_level
end
- EMPTY_HASH = {}.freeze
def new_level(level)
- self.class.new(EMPTY_HASH, self, level)
+ self.class.new(frame, self, level)
end
def [](key)