Skip to content

Commit

Permalink
Fix for the previous commit
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
yugui committed Jan 10, 2010
1 parent eb87f15 commit 0b0aafc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/webrick/httpstatus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/webrick/test_cgi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def test_bad_uri
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

Expand All @@ -127,7 +127,7 @@ def test_bad_header
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
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0b0aafc

Please sign in to comment.