lib/action_dispatch/middleware/stack.rb in actionpack-5.2.8.1 vs lib/action_dispatch/middleware/stack.rb in actionpack-6.0.0.beta1
- old
+ new
@@ -95,11 +95,11 @@
def use(klass, *args, &block)
middlewares.push(build_middleware(klass, args, block))
end
- def build(app = nil, &block)
- middlewares.freeze.reverse.inject(app || block) { |a, e| e.build(a) }
+ def build(app = Proc.new)
+ middlewares.freeze.reverse.inject(app) { |a, e| e.build(a) }
end
private
def assert_index(index, where)