diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-18 05:09:08 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-18 05:09:08 +0000 |
commit | ab364fb5a8768de14a189a0ba46e3e675e19ccf9 () | |
tree | 78cefa1a1c6bf7b234e8fb563711965183a52e88 /lib/ipaddr.rb | |
parent | 78dc3da299f49eec2783190ad72812852750f40e (diff) |
Import ipaddr 1.2.2
- Enable frozen_string_literal and do a bit of code cleanup git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/ipaddr.rb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -# frozen_string_literal: false # # ipaddr.rb - A class to manipulate an IP address # @@ -103,13 +103,13 @@ class IPAddr # Creates a new ipaddr containing the given network byte ordered # string form of an IP address. - def IPAddr::new_ntoh(addr) - return IPAddr.new(IPAddr::ntop(addr)) end # Convert a network byte ordered string form of an IP address into # human readable form. - def IPAddr::ntop(addr) case addr.size when 4 s = addr.unpack('C4').join('.') |