Skip to content

Commit 6c15342

Browse files
committed
Fix the regexp used to clean the host
Introduced in ruby/ruby@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.
1 parent e57d4f3 commit 6c15342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/net/http/generic_request.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def update_uri(addr, port, ssl) # :nodoc: internal use only
143143
end
144144

145145
if host = self['host']
146-
host.sub!(/:.*/s, ''.freeze)
146+
host.sub!(/:.*/m, ''.freeze)
147147
elsif host = @uri.host
148148
else
149149
host = addr

0 commit comments

Comments
 (0)