Added validation for port argument (in referral to issue #12). Port number must be a valid integer from 1 to 65535.

This commit is contained in:
PirosB3 2011-06-29 22:55:35 +02:00
parent d5eca8bab3
commit 0703732ddb
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ end
args = options.parse!
local_port = args[0]
unless local_port
unless local_port.to_i.between?(1, 65535)
puts options
exit
end