raise expection if port passed to -p is not a valid integer

This commit is contained in:
Konstantin Haase 2011-06-17 16:42:57 +02:00
parent bf6c876c19
commit 21bc6271d5
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ module Sinatra
op.on('-x') { set :lock, true }
op.on('-e env') { |val| set :environment, val.to_sym }
op.on('-s server') { |val| set :server, val }
op.on('-p port') { |val| set :port, val.to_i }
op.on('-p port') { |val| set :port, Integer(val) }
op.on('-o addr') { |val| set :bind, val }
}.parse!(ARGV.dup)
end