next when check key is nil, donot add it to pp
Signed-off-by: Wei Jihui <weijihuiall(a)163.com>
---
lib/job.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/job.rb b/lib/job.rb
index 3c555e13..c3966546 100755
--- a/lib/job.rb
+++ b/lib/job.rb
@@ -568,7 +568,9 @@ class Job
init_program_options()
for_each_in(@job, @referenced_programs.keys) do |_pk, h, p_n, p_args|
k = hash_key_re_string(@job, p_n, @job['pp'].keys)
- if k && !(a)job[k].is_a?(Hash)
+ next if k.nil?
+
+ unless @job[k].is_a?(Hash)
@job['pp'][k] = @job[k]
next
end
--
2.23.0