Skip to content

Commit 9fac2c3

Browse files
committed
Prefer squigly heredocs.
1 parent ee60354 commit 9fac2c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/webrick/test_httprequest.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ def test_simple_request
1919
end
2020

2121
def test_parse_09
22-
msg = <<-_end_of_message_
22+
msg = <<~HTTP.gsub("\n", "\r\n")
2323
GET /
2424
foobar # HTTP/0.9 request don't have header nor entity body.
25-
_end_of_message_
25+
HTTP
2626
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
27-
req.parse(StringIO.new(msg.gsub(/^ {6}/, "").gsub("\n", "\r\n")))
27+
req.parse(StringIO.new(msg))
2828
assert_equal("GET", req.request_method)
2929
assert_equal("/", req.unparsed_uri)
3030
assert_equal(WEBrick::HTTPVersion.new("0.9"), req.http_version)

0 commit comments

Comments
 (0)