Skip to content
This repository
Browse code

golf down rc file reading

  • Loading branch information...
commit 1df1877b74671ddb1e0183dd2026ede34700557f 1 parent 9bc99b4
Aaron Patterson authored
3  railties/lib/rails/generators/rails/app/app_generator.rb
@@ -363,8 +363,7 @@ def railsrc(argv)
363 363
         end
364 364
 
365 365
         def read_rc_file(railsrc)
366  
-          extra_args_string = File.read(railsrc)
367  
-          extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten
  366
+          extra_args = File.readlines(railsrc).flat_map(&:split)
368 367
           puts "Using #{extra_args.join(" ")} from #{railsrc}"
369 368
           extra_args
370 369
         end

0 notes on commit 1df1877

Please sign in to comment.
Something went wrong with that request. Please try again.