Sha256: 9dc9e512b48eda1732aec2059a85f72bb2a826d00374e80121bca1ea724364bb
Contents?: true
Size: 443 Bytes
Versions: 20
Compression:
Stored size: 443 Bytes
Contents
# frozen_string_literal: true module HTTPX module Punycode module_function begin require "idnx" def encode_hostname(hostname) Idnx.to_punycode(hostname) end rescue LoadError def encode_hostname(hostname) warn "#{hostname} cannot be converted to punycode. Install the " \ "\"idnx\" gem: https://github.com/HoneyryderChuck/idnx" hostname end end end end
Version data entries
20 entries across 20 versions & 1 rubygems