Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

1.9 compat: let -c option work with Ruby 1.9

[#3109 state:committed milestone:2.3.5]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit 3413643e83c09533c95a1ccf0d9785f6d892203c 1 parent 028d449
@amatsuda amatsuda authored jeremy committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails_generator/options.rb
View
6 railties/lib/rails_generator/options.rb
@@ -131,9 +131,9 @@ def add_general_options!(opt)
opt.on('-q', '--quiet', 'Suppress normal output.') { |v| options[:quiet] = v }
opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |v| options[:backtrace] = v }
opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do
- options[:svn] = `svn status`.inject({}) do |opt, e|
- opt[e.chomp[7..-1]] = true
- opt
+ options[:svn] = {}
+ `svn status`.each_line do |line|
+ options[:svn][line.chomp[7..-1]] = true
end
end
opt.on('-g', '--git', 'Modify files with git. (Note: git must be in path)') do
Please sign in to comment.
Something went wrong with that request. Please try again.