Permalink
Browse files

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.
  • Loading branch information...
1 parent 1ccbf7d commit 0c5d8f813c490d2bade92d51c04b3c9393f6e164 @wangjohn wangjohn committed Jul 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/lib/rails/commands/commands_tasks.rb
@@ -100,7 +100,7 @@ def new
end
def version
- ARGV.unshift '--version'
+ argv.unshift '--version'
require_command!("application")
end
@@ -117,7 +117,7 @@ def exit_with_initialization_warning!
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)

0 comments on commit 0c5d8f8

Please sign in to comment.