diff options
-rw-r--r-- | lib/webrick/httpstatus.rb | 5 | ||||
-rw-r--r-- | test/webrick/test_cgi.rb | 4 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/webrick/httpstatus.rb b/lib/webrick/httpstatus.rb index 325bfa8d65..f354b7d75d 100644 --- a/lib/webrick/httpstatus.rb +++ b/lib/webrick/httpstatus.rb @@ -13,8 +13,9 @@ module WEBrick module HTTPStatus class Status < StandardError - def initialize(message, *rest) - super(AccessLog.escape(message), *rest) + def initialize(*args) + args[0] = AccessLog.escape(args[0]) unless args.empty? + super(*args) end class << self attr_reader :code, :reason_phrase diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb index 50affcae91..2d7ad2d085 100644 --- a/test/webrick/test_cgi.rb +++ b/test/webrick/test_cgi.rb @@ -113,7 +113,7 @@ class TestWEBrickCGI < Test::Unit::TestCase assert_match(%r{\AHTTP/\d.\d 400 Bad Request}, res) s = log.call.each_line.grep(/ERROR bad URI/)[0] assert_match(DumpPat, s) - assert_not_match(CtrlPat, s) + refute_match(CtrlPat, s) } end @@ -127,7 +127,7 @@ class TestWEBrickCGI < Test::Unit::TestCase assert_match(%r{\AHTTP/\d.\d 400 Bad Request}, res) s = log.call.each_line.grep(/ERROR bad header/)[0] assert_match(DumpPat, s) - assert_not_match(CtrlPat, s) + refute_match(CtrlPat, s) } end end @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 377 +#define RUBY_PATCHLEVEL 378 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |