summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-18 16:09:02 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-18 16:09:02 +0000
commitdf7c89b442a2e8853f44b47f98fda1b1c531c3a7 (patch)
treec1f0aa4d62934d41919bc237a5b3d8a2cc24b1f3
parent54fec448f53826368426ca415bc4e15df9b4b817 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@4574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/webrick/log.rb8
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c8db575b7..8a0b1b090f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Sep 19 01:00:48 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual
+ condition.
+
+ * lib/webrick/log.rb (BasicLog#format): add "\n" to message.
+
Thu Sep 18 22:43:20 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (proc_invoke): should push PROT_PCALL tag for orphans.
diff --git a/lib/webrick/log.rb b/lib/webrick/log.rb
index 68db47abc7..5d4fd0a174 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