From d4e1a75918049f269803fa6d3c77ae5da8a04f59 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 10 Aug 2015 13:16:14 -0700 Subject: 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. --- actionpack/lib/action_dispatch/routing/mapper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing') 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) -- cgit v1.2.3