Highlights
Decode a hexadecimal IPv6 string into a double-dotted hexadecimal format
Convert a binary string to decimal (binary to hexadecimal then hexadecimal to decimal)
URL-encode the URL component string (RFC 3986)
CHANGELOG
- Breaking changes
- Drop Ruby 2.7 support because there is no
URI:WS
andURI:WSS
used fordefang_uri
and anyway official support has ended too hex2bin
now returns even number of chars (pad with0
) by default and add an option to disable it.urlencode_component
&urldecode_component
were renamed tourlencode_data
&urldecode_data
,urlencode_component
&urldecode_component
are now new functions
- Drop Ruby 2.7 support because there is no
- Changes:
- Renamed
from_hexip
tofrom_hexipv4
and created an aliasesfrom_hexip
forfrom_hexipv4
. Same forto_hexipv4
and bang methods. - add options support for all decimal methods and aliases
- Renamed
- New methods:
from_hexipv6
andfrom_hexipv6!
bin2dec
anddec2bin
urlencode_component
(see breaking change, the oldurlencode_component
was renamedurlencode_data
)urldecode_component
(see breaking change, the oldurldecode_component
was renamedurldecode_data
)
- Chore:
- Add support for Ruby 3.3 (up to Ruby < 4.0)
- Fix:
- bin2hex: fix odd byte cropping issue
- fix documentation for base64