From 9fac2c3331f7b5efc25c676425193a7e654efbc1 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 11 Jul 2024 21:47:35 +1200 Subject: [PATCH] Prefer squigly heredocs. --- test/webrick/test_httprequest.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/webrick/test_httprequest.rb b/test/webrick/test_httprequest.rb index fa18177..c2ff599 100644 --- a/test/webrick/test_httprequest.rb +++ b/test/webrick/test_httprequest.rb @@ -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)