diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-18 05:28:00 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-18 05:28:00 +0000 |
commit | db871c8d54175a11e113fd8b147a041a4a44dfe9 (patch) | |
tree | 387d191834e9d25ccf65637161b9a67b88e31db1 | |
parent | fb3fc46cddfe5d1a5f8a4cfb10aac94a11b4c77d (diff) | |
download | rails-db871c8d54175a11e113fd8b147a041a4a44dfe9.tar.gz rails-db871c8d54175a11e113fd8b147a041a4a44dfe9.tar.bz2 rails-db871c8d54175a11e113fd8b147a041a4a44dfe9.zip |
Eliminate nil from newly generated logfiles. References #2927.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index f67ab956f8..b603e9f894 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Eliminate nil from newly generated logfiles. #2927 [Blair Zajac <blair@orcaware.com>] + * 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 2da82f545d..2038bb5fec 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -192,7 +192,7 @@ module Rails 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 !~ /^#!/ |