From 4bce8e3c7510cd1bc1821af208d05e8c87349fb2 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Tue, 28 Sep 2010 15:10:55 -0300 Subject: [PATCH] No need to call super here. Use yield instead block.call --- actionpack/lib/action_dispatch/middleware/stack.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/stack.rb b/actionpack/lib/action_dispatch/middleware/stack.rb index db7f342bc5..9ea188c3e2 100644 --- a/actionpack/lib/action_dispatch/middleware/stack.rb +++ b/actionpack/lib/action_dispatch/middleware/stack.rb @@ -41,9 +41,8 @@ module ActionDispatch end end - def initialize(*args, &block) - super(*args) - block.call(self) if block_given? + def initialize(*args) + yield(self) if block_given? end def insert(index, *args, &block)