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 /railties/lib/rails_generator | |
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
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 !~ /^#!/ |