diff options
Diffstat (limited to 'lib/ohai/plugins/darwin/network.rb')
-rw-r--r-- | lib/ohai/plugins/darwin/network.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/darwin/network.rb b/lib/ohai/plugins/darwin/network.rb index 9736987d..4f59397e 100644 --- a/lib/ohai/plugins/darwin/network.rb +++ b/lib/ohai/plugins/darwin/network.rb @@ -66,8 +66,8 @@ Ohai.plugin(:Network) do def scope_lookup(scope) return "Node" if scope.eql?("::1") - return "Link" if scope =~ /^fe80\:/ - return "Site" if scope =~ /^fec0\:/ + return "Link" if /^fe80\:/.match?(scope) + return "Site" if /^fec0\:/.match?(scope) "Global" end @@ -79,7 +79,7 @@ Ohai.plugin(:Network) do def locate_interface(ifaces, ifname, mac) return ifname unless ifaces[ifname].nil? # oh well, time to go hunting! - return ifname.chop if ifname =~ /\*$/ + return ifname.chop if /\*$/.match?(ifname) ifaces.each_key do |ifc| ifaces[ifc][:addresses].each_key do |addr| |