From e5444f84dfa0237b1ffa758c940723852f366a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 22 Jun 2010 23:52:12 +0200 Subject: Stop filling the blocks scope array with nil. --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 77740b0f53..2005382b8e 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -418,7 +418,9 @@ module ActionDispatch end def merge_blocks_scope(parent, child) - (parent || []) + [child] + merged = parent ? parent.dup : [] + merged << child if child + merged end def merge_options_scope(parent, child) -- cgit v1.2.3