regex style change to make rubocop happy
authorTim Skirvin <tskirvin@fnal.gov>
Wed, 17 Mar 2021 15:54:49 +0000 (10:54 -0500)
committerTim Skirvin <tskirvin@fnal.gov>
Wed, 17 Mar 2021 15:54:49 +0000 (10:54 -0500)
lib/puppet/provider/firewall/iptables.rb

index f423949e7f828e196ab948a925cf5642fc5ba7a8..f193d5b8eaf552f0ba2363bb8a9b7406153b58e4 100644 (file)
@@ -576,7 +576,7 @@ Puppet::Type.type(:firewall).provide :iptables, parent: Puppet::Provider::Firewa
     end
 
     # manually remove comments if they made it this far
-    if values =~ %r{-m comment --comment}
+    if %r{-m comment --comment}.match?(values)
       values = values.sub(%r{-m comment --comment "((?:\\"|[^"])*)"}, {})
     end