From cf3e3effb01215c2556ba509d3cb4debe1d901e8 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Sat, 16 Apr 2016 20:52:01 +0200 Subject: Minor refactoring in code related to job variables --- lib/ci/gitlab_ci_yaml_processor.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index e152de590de..209da7ad81f 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -45,11 +45,7 @@ module Ci end def job_variables(name) - if job = @jobs[name.to_sym] - job[:variables] || [] - else - [] - end + @jobs[name.to_sym].try(:fetch, :variables, []) || [] end private -- cgit v1.2.1