mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Use #Integer (thank you, @rkh)
This commit is contained in:
parent
d8876cff0a
commit
816c0812f3
1 changed files with 1 additions and 1 deletions
|
@ -366,7 +366,7 @@ module Sinatra
|
|||
result = file.serving env
|
||||
result[1].each { |k,v| headers[k] ||= v }
|
||||
headers['Content-Length'] = result[1]['Content-Length']
|
||||
opts[:status] = opts[:status].to_i if opts[:status].is_a?(String)
|
||||
opts[:status] &&= Integer(opts[:status])
|
||||
halt opts[:status] || result[0], result[2]
|
||||
rescue Errno::ENOENT
|
||||
not_found
|
||||
|
|
Loading…
Reference in a new issue