Skip to content

Commit

Permalink
Prefer squigly heredocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 11, 2024
1 parent ee60354 commit 9fac2c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/webrick/test_httprequest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ def test_simple_request
end

def test_parse_09
msg = <<-_end_of_message_
msg = <<~HTTP.gsub("\n", "\r\n")
GET /
foobar # HTTP/0.9 request don't have header nor entity body.
_end_of_message_
HTTP
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
req.parse(StringIO.new(msg.gsub(/^ {6}/, "").gsub("\n", "\r\n")))
req.parse(StringIO.new(msg))
assert_equal("GET", req.request_method)
assert_equal("/", req.unparsed_uri)
assert_equal(WEBrick::HTTPVersion.new("0.9"), req.http_version)
Expand Down

0 comments on commit 9fac2c3

Please sign in to comment.