diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/webrick/accesslog.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httpstatus.rb | 7 |
3 files changed, 12 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Mon Jan 11 13:30:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/webrick/accesslog.rb (WEBrick::AccessLog#format): fixed typo. + + * lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::Status#initialize): + accept 0 or more arguments. [ruby-dev:40021] + Mon Jan 11 12:47:58 2010 Akinori MUSHA <knu@iDaemons.org> * hash.c (ruby_setenv): ENV.[]= should raise an error if setenv(3) diff --git a/lib/webrick/accesslog.rb b/lib/webrick/accesslog.rb index 75a3a3e694..0bed8097d5 100644 --- a/lib/webrick/accesslog.rb +++ b/lib/webrick/accesslog.rb @@ -53,7 +53,7 @@ module WEBrick when ?e, ?i, ?n, ?o raise AccessLogError, "parameter is required for \"#{spec}\"" unless param - param = params[spec][param] ? escape(param) : "-" + (param = params[spec][param]) ? escape(param) : "-" when ?t params[spec].strftime(param || CLF_TIME_FORMAT) when ?% diff --git a/lib/webrick/httpstatus.rb b/lib/webrick/httpstatus.rb index 77a1d3ee50..a49be32be9 100644 --- a/lib/webrick/httpstatus.rb +++ b/lib/webrick/httpstatus.rb @@ -12,9 +12,10 @@ module WEBrick module HTTPStatus - class Status < StandardError - def initialize(message, *rest) - super(AccessLog.escape(message), *rest) + class Status < StandardError + def initialize(*args) + args[0] = AccessLog.escape(args[0]) unless args.empty? + super(*args) end class << self attr_reader :code, :reason_phrase |