class ActionDispatch::MiddlewareStack

def delete!(target)

raises +RuntimeError+ if the target is not found.
Returns the array of middlewares not including the deleted item, or

Deletes a middleware from the middleware stack.
def delete!(target)
  delete(target) || (raise "No such middleware to remove: #{target.inspect}")
end