From 7fa8431c69f98fa663cf9bebcd5216741e2e0558 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sat, 5 Dec 2015 21:42:29 +0100 Subject: Default `argv` to an empty array. The `ARGV` constant in Ruby is not a string, it's an array as demonstrated by running: ``` $ ruby -e "p ARGV" => [] $ $ ruby -e "p ARGV" test/file.rb --version=2 => ["test/file.rb", "--version=2"] ``` --- railties/lib/rails/commands/command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/commands/command.rb b/railties/lib/rails/commands/command.rb index 37d61a8bea..b491821161 100644 --- a/railties/lib/rails/commands/command.rb +++ b/railties/lib/rails/commands/command.rb @@ -3,7 +3,7 @@ module Rails class Command attr_reader :argv - def initialize(argv = '') + def initialize(argv = []) @argv = argv @option_parser = build_option_parser -- cgit v1.2.3