about summary refs log tree commit homepage
path: root/lib/mongrel/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mongrel/command.rb')
-rw-r--r--lib/mongrel/command.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mongrel/command.rb b/lib/mongrel/command.rb
index db54e1d..f8737f0 100644
--- a/lib/mongrel/command.rb
+++ b/lib/mongrel/command.rb
@@ -32,7 +32,7 @@ module Mongrel
       # Called by the subclass to setup the command and parse the argv arguments.
       # The call is destructive on argv since it uses the OptionParser#parse! function.
       def initialize(options={})
-        argv = options[:argv]
+        argv = options[:argv] || []
         @opt = OptionParser.new
         @valid = true
         # this is retarded, but it has to be done this way because -h and -v exit
@@ -55,7 +55,7 @@ module Mongrel
           end
         end
         
-        @opt.parse! options[:argv]
+        @opt.parse! argv
       end
       
       # Returns true/false depending on whether the command is configured properly.