diff --git a/railties/CHANGELOG b/railties/CHANGELOG index f67ab956f8477bec924bf925f96fb64980117163..b603e9f8942c28cb87541609064da5b61f161ddb 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Eliminate nil from newly generated logfiles. #2927 [Blair Zajac ] + * Update to Prototype 1.4.0_rc3. Closes #1893, #2505, #2550, #2748, #2783. [Sam Stephenson] * Rename Version constant to VERSION. #2802 [Marcel Molina Jr.] diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index 2da82f545d4692bb63a445fbd02a201e2744dd4b..2038bb5fec2276ac4b58852d444ff230ecc1aaae 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -192,7 +192,7 @@ def file(relative_source, relative_destination, file_options = {}, &block) if block_given? df.write(yield(sf)) else - line = sf.gets + line = sf.gets || '' if file_options[:shebang] df.puts("#!#{file_options[:shebang]}") df.puts(line) if line !~ /^#!/