summaryrefslogtreecommitdiff
path: root/lib/ipaddr.rb
diff options
context:
space:
mode:
authorBen Fritsch <[email protected]>2020-04-03 16:48:15 +0200
committerHiroshi SHIBATA <[email protected]>2024-04-18 10:27:19 +0900
commit6ac8f6a10eb011147a6cdaf4cf4154c41a7d9080 ()
tree5232d2c12492623905e6f1a999522beaec8ff4f9 /lib/ipaddr.rb
parent07771c7657e65e8da6cd11eacbb105bdf46d0f10 (diff)
[ruby/ipaddr] Add IPAddr.cidr to return ip address in cidr notation
https://.com/ruby/ipaddr/commit/f5b006741f
-rw-r--r--lib/ipaddr.rb6
1 files changed, 6 insertions, 0 deletions
@@ -227,6 +227,12 @@ class IPAddr
return str
end
# Returns a network byte ordered string form of the IP address.
def hton
case @family