lib/ohai/mixin/network_helper.rb in ohai-17.9.4 vs lib/ohai/mixin/network_helper.rb in ohai-18.0.14

- old
+ new

@@ -21,15 +21,13 @@ require "socket" unless defined?(Socket) module Ohai module Mixin module NetworkHelper - unless defined?(FAMILIES) - FAMILIES = { - "inet" => "default", - "inet6" => "default_inet6", - }.freeze - end + FAMILIES = { + "inet" => "default", + "inet6" => "default_inet6", + }.freeze def hex_to_dec_netmask(netmask) # example 'ffff0000' -> '255.255.0.0' dec = netmask[0..1].to_i(16).to_s(10) [2, 4, 6].each { |n| dec = dec + "." + netmask[n..n + 1].to_i(16).to_s(10) }