diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 15:10:55 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 15:10:55 -0300 |
commit | 4bce8e3c7510cd1bc1821af208d05e8c87349fb2 (patch) | |
tree | 77ce8c27e1f17209bcd6461a95ff958f51882d77 | |
parent | b8c565fbd68343b419b05a53b4e1844062d1197e (diff) | |
download | rails-4bce8e3c7510cd1bc1821af208d05e8c87349fb2.tar.gz rails-4bce8e3c7510cd1bc1821af208d05e8c87349fb2.tar.bz2 rails-4bce8e3c7510cd1bc1821af208d05e8c87349fb2.zip |
No need to call super here. Use yield instead block.call
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/stack.rb | 5 |
1 files 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) |