diff options
author | wangjohn <wangjohn@mit.edu> | 2013-07-09 08:21:54 -0400 |
---|---|---|
committer | wangjohn <wangjohn@mit.edu> | 2013-07-09 08:21:54 -0400 |
commit | 0c5d8f813c490d2bade92d51c04b3c9393f6e164 (patch) | |
tree | 9e7e555d469fb41c4f87abe4bbb130d3e953ace5 /railties/lib/rails/commands | |
parent | 1ccbf7d76a8f940d1eaa6747e25cb1031f19b47f (diff) | |
download | rails-0c5d8f813c490d2bade92d51c04b3c9393f6e164.tar.gz rails-0c5d8f813c490d2bade92d51c04b3c9393f6e164.tar.bz2 rails-0c5d8f813c490d2bade92d51c04b3c9393f6e164.zip |
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.
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/commands_tasks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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) |