From 0c5d8f813c490d2bade92d51c04b3c9393f6e164 Mon Sep 17 00:00:00 2001 From: wangjohn Date: Tue, 9 Jul 2013 08:21:54 -0400 Subject: Using the instance variable for argv. Instead of using the global constant ARGV, we're changing to using the instance variable because it is more testable. --- railties/lib/rails/commands/commands_tasks.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/commands') diff --git a/railties/lib/rails/commands/commands_tasks.rb b/railties/lib/rails/commands/commands_tasks.rb index bb25d6419b..11524c4ef5 100644 --- a/railties/lib/rails/commands/commands_tasks.rb +++ b/railties/lib/rails/commands/commands_tasks.rb @@ -100,7 +100,7 @@ EOT end def version - ARGV.unshift '--version' + argv.unshift '--version' require_command!("application") end @@ -117,7 +117,7 @@ EOT end def shift_argv! - ARGV.shift if ARGV.first && ARGV.first[0] != '-' + argv.shift if argv.first && argv.first[0] != '-' end def require_command!(command) -- cgit v1.2.3