class Sinatra::Default

def invoke(&block) #:nodoc:

:nodoc:
values.
deprecated. Override the invoke method to detect those types of return
Throwing halt with a Symbol and the to_result convention are
def invoke(&block) #:nodoc:
  res = super
  case
  when res.kind_of?(Symbol)
    sinatra_warn "Invoking the :#{res} helper by returning a Symbol is deprecated;",
      "call the helper directly instead."
    @response.body = __send__(res)
  when res.respond_to?(:to_result)
    sinatra_warn "The to_result convention is deprecated."
    @response.body = res.to_result(self)
  end
  res
end