global
def sinatra_warn(*message) #:nodoc:
Like Kernel#warn but outputs the location that triggered the warning.
def sinatra_warn(*message) #:nodoc: line = caller. detect { |line| line !~ /(?:lib\/sinatra\/|__DELEGATE__)/ }. sub(/:in .*/, '') warn "#{line}: warning: #{message.join(' ')}" end