lib/httpx/domain_name.rb in httpx-0.24.0 vs lib/httpx/domain_name.rb in httpx-0.24.1

- old
+ new

@@ -61,10 +61,10 @@ end # Normalizes a _domain_ using the Punycode algorithm as necessary. # The result will be a downcased, ASCII-only string. def normalize(domain) - domain = domain.ascii_only? ? domain : domain.chomp(DOT).unicode_normalize(:nfc) + domain = domain.chomp(DOT).unicode_normalize(:nfc) unless domain.ascii_only? Punycode.encode_hostname(domain).downcase end end # Parses _hostname_ into a DomainName object. An IP address is also