raise expection if port passed to -p is not a valid integer
This commit is contained in:
parent
bf6c876c19
commit
21bc6271d5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue