summaryrefslogtreecommitdiff
path: root/doc/optparse
diff options
context:
space:
mode:
authorKasumi Hanazuki <[email protected]>2023-11-27 04:15:48 +0000
committerHiroshi SHIBATA <[email protected]>2023-12-25 21:12:49 +0900
commiteb53131367d6e1d3da16b0cd6bc44284ea3589ea (patch)
tree1b969044254962728adbaa1fcc08f92f16b83170 /doc/optparse
parentea5776e7e4262c915f7f8b8884af420dd87d769c (diff)
[ruby/ipaddr] ntop: Measure address size in bytes
`IPAddr.ntop` takes the binary representation of an IP address, whose length should be 4 or 16 *bytes* (not characters/codepoints). The current implementation accepts strings in any encoding, but for some values in non-BINARY encoding, it fails proper length check and raises an `AddressFamilyError`. Since passing strings in a multibyte encoding has never worked correctly for years, this patch makes it an explicit error with an `InvalidAddressError`. Fixes: https://github.com/ruby/ipaddr/issues/56 https://github.com/ruby/ipaddr/commit/a33fd14d4a
Diffstat (limited to 'doc/optparse')
0 files changed, 0 insertions, 0 deletions