lib/facades/configuration_page_facade.rb in puppet-sec-lint-0.5.16 vs lib/facades/configuration_page_facade.rb in puppet-sec-lint-0.5.17
- old
+ new
@@ -73,11 +73,10 @@
when DisplayField[:SelectBox]
configuration.value = new_conf[configuration.id].split(/\r?\n/).delete_if(&:empty?)
when DisplayField[:RegexBox]
- configuration.value = Regexp.new new_conf[configuration.id]
-
+ configuration.value = if new_conf[configuration.id].empty? then new_conf[configuration.id] else Regexp.new new_conf[configuration.id] end
else
configuration.value = new_conf[configuration.id]
end
end
\ No newline at end of file