Fix for undefined method + for nil class error

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
Vasu1105 2021-04-28 11:34:49 +05:30
parent 57c1484150
commit c56b098761

View file

@ -91,7 +91,7 @@ module Inspec
end
def all_controls
ret = @rules.values
ret = @rules.values.reject(&:nil?)
ret += @control_subcontexts.map(&:all_rules).flatten
ret
end