diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-18 16:09:02 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-18 16:09:02 +0000 |
| commit | 44b4e13bf2482a2577942e67d5a13e70928118a4 (patch) | |
| tree | c1f0aa4d62934d41919bc237a5b3d8a2cc24b1f3 /lib/webrick | |
| parent | f8962a793fd9774c524c9f86e6f97902950a4a45 (diff) | |
| download | ruby-44b4e13bf2482a2577942e67d5a13e70928118a4.tar.gz ruby-44b4e13bf2482a2577942e67d5a13e70928118a4.tar.xz ruby-44b4e13bf2482a2577942e67d5a13e70928118a4.zip | |
* lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual
condition.
* lib/webrick/log.rb (BasicLog#format): add "\n" to message.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick')
| -rw-r--r-- | lib/webrick/log.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/webrick/log.rb b/lib/webrick/log.rb index 68db47abc..5d4fd0a17 100644 --- a/lib/webrick/log.rb +++ b/lib/webrick/log.rb @@ -36,10 +36,8 @@ module WEBrick def log(level, data) if @log && level <= @level - if /\n\Z/ != data - @log << data - @log << "\n" if /\n\Z/ !~ data - end + data += "\n" if /\n\Z/ !~ data + @log << data end end @@ -64,7 +62,7 @@ module WEBrick def format(arg) str = if arg.is_a?(Exception) "#{arg.class}: #{arg.message}\n\t" << - arg.backtrace.join("\n\t") + arg.backtrace.join("\n\t") << "\n" elsif arg.respond_to?(:to_str) arg.to_str else |
