diff modules/firewall/lib/facter/iptables_version.rb @ 275:d9352a684e62

Mass update of modules to remove deprecation warnings
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Jan 2020 11:36:07 +0000
parents d6f2a0ee45c0
children 66c406eec60d
line wrap: on
line diff
--- a/modules/firewall/lib/facter/iptables_version.rb	Sat Jan 04 11:42:45 2020 +0000
+++ b/modules/firewall/lib/facter/iptables_version.rb	Sun Jan 26 11:36:07 2020 +0000
@@ -1,9 +1,9 @@
 Facter.add(:iptables_version) do
-  confine :kernel => :linux
+  confine kernel: :Linux
   setcode do
     version = Facter::Util::Resolution.exec('iptables --version')
     if version
-      version.match(/\d+\.\d+\.\d+/).to_s
+      version.match(%r{\d+\.\d+\.\d+}).to_s
     else
       nil
     end