about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/unicorn6
-rwxr-xr-xbin/unicorn_rails6
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/unicorn b/bin/unicorn
index 01984f8..c272e43 100755
--- a/bin/unicorn
+++ b/bin/unicorn
@@ -47,9 +47,9 @@ op = OptionParser.new("", 24, '  ') do |opts|
     rackup_opts[:set_listener] = true
   end
 
-  opts.on("-p", "--port PORT",
-          "use PORT (default: #{Unicorn::Const::DEFAULT_PORT})") do |p|
-    rackup_opts[:port] = p.to_i
+  opts.on("-p", "--port PORT", Integer,
+          "use PORT (default: #{Unicorn::Const::DEFAULT_PORT})") do |port|
+    rackup_opts[:port] = port
     rackup_opts[:set_listener] = true
   end
 
diff --git a/bin/unicorn_rails b/bin/unicorn_rails
index 4bd599f..b080846 100755
--- a/bin/unicorn_rails
+++ b/bin/unicorn_rails
@@ -48,9 +48,9 @@ op = OptionParser.new("", 24, '  ') do |opts|
     rackup_opts[:set_listener] = true
   end
 
-  opts.on("-p", "--port PORT",
-          "use PORT (default: #{Unicorn::Const::DEFAULT_PORT})") do |p|
-    rackup_opts[:port] = p.to_i
+  opts.on("-p", "--port PORT", Integer,
+          "use PORT (default: #{Unicorn::Const::DEFAULT_PORT})") do |port|
+    rackup_opts[:port] = port
     rackup_opts[:set_listener] = true
   end