[ruby/net-http] Fix the regexp used to clean the host

Introduced in https://github.com/ruby/ruby/commit/c1652035644

`/s` marks the regexp as encoded with Windows-31J which makes little
sense.

Nurse thinks the intent was to use `/m` for a multi-line regexp.

https://github.com/ruby/net-http/commit/6c15342cdf
This commit is contained in:
Jean Boussier 2021-03-18 22:05:06 +01:00 коммит произвёл Hiroshi SHIBATA
Родитель 842f00f452
Коммит 1229ad0528
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -143,7 +143,7 @@ class Net::HTTPGenericRequest
end
if host = self['host']
host.sub!(/:.*/s, ''.freeze)
host.sub!(/:.*/m, ''.freeze)
elsif host = @uri.host
else
host = addr