Skip to content

Commit

Permalink
stop mutating ARGV
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 30, 2013
1 parent a092ea1 commit fe7ec5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions railties/lib/rails/commands/application.rb
Expand Up @@ -13,5 +13,5 @@ def self.exit_on_failure?
end
end

Rails::Generators::ARGVScrubber.new(ARGV).prepare!
Rails::Generators::AppGenerator.start
args = Rails::Generators::ARGVScrubber.new(ARGV).prepare!
Rails::Generators::AppGenerator.start args
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/rails/app/app_generator.rb
Expand Up @@ -315,7 +315,7 @@ class ARGVScrubber # :nodoc
attr_reader :argv

def initialize(argv = ARGV)
@argv = argv
@argv = argv.dup
end

def prepare!
Expand Down

0 comments on commit fe7ec5d

Please sign in to comment.