diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-05-07 08:39:42 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-10-07 18:22:42 +0900 |
commit | 38da84296c0e50c4285d8a8c146af5fc3c8afc7d (patch) | |
tree | cab31bcaeb97eb185897cd1ab518c452258766a4 /lib/ipaddr.rb | |
parent | 54ee22be5308ee958a73bd546bc867d2337d74d8 (diff) |
[ruby/ipaddr] Raise if extra slashes follow
https://bugs.ruby-lang.org/issues/15832
https://github.com/ruby/ipaddr/commit/de9805d6fa
Diffstat (limited to 'lib/ipaddr.rb')
-rw-r--r-- | lib/ipaddr.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb index 26d1bd7409..6385d69c6a 100644 --- a/lib/ipaddr.rb +++ b/lib/ipaddr.rb @@ -566,7 +566,7 @@ class IPAddr raise AddressFamilyError, "unsupported address family: #{family}" end end - prefix, prefixlen = addr.split('/') + prefix, prefixlen = addr.split('/', 2) if prefix =~ /\A\[(.*)\]\z/i prefix = $1 family = Socket::AF_INET6 |