lib/resources/audit_policy.rb in inspec-0.9.8 vs lib/resources/audit_policy.rb in inspec-0.9.9
- old
+ new
@@ -42,10 +42,10 @@
result ||= inspec.command("Auditpol /get /subcategory:'#{key}' /r").stdout
# find line
target = nil
result.each_line {|s|
- target = s.strip if s.match(/\b.*#{key}.*\b/)
+ target = s.strip if s =~ /\b.*#{key}.*\b/
}
# extract value
values = nil
unless target.nil?