Skip to content

Commit

Permalink
No need to call super here. Use yield instead block.call
Browse files Browse the repository at this point in the history
  • Loading branch information
miloops committed Sep 28, 2010
1 parent b8c565f commit 4bce8e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions actionpack/lib/action_dispatch/middleware/stack.rb
Expand Up @@ -41,9 +41,8 @@ def normalize(object)
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)
Expand Down

0 comments on commit 4bce8e3

Please sign in to comment.