Skip to content

Commit

Permalink
raise expection if port passed to -p is not a valid integer
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Jun 17, 2011
1 parent bf6c876 commit 21bc627
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Application < Base
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
Expand Down

0 comments on commit 21bc627

Please sign in to comment.