From 56a01151d5c8e85d50069f88c22017ed4c8c06eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Thu, 22 Nov 2018 12:12:53 +0100 Subject: Allow to store null variables --- lib/gitlab/ci/variables/collection/item.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb index cf8958e34c2..e3e4e62cc02 100644 --- a/lib/gitlab/ci/variables/collection/item.rb +++ b/lib/gitlab/ci/variables/collection/item.rb @@ -6,8 +6,8 @@ module Gitlab class Collection class Item def initialize(key:, value:, public: true, file: false) - raise ArgumentError, "`#{key}` must be of type String, while it was: #{value.class}" unless - value.is_a?(String) + raise ArgumentError, "`#{key}` must be of type String or nil value, while it was: #{value.class}" unless + value.is_a?(String) || value.nil? @variable = { key: key, value: value, public: public, file: file -- cgit v1.2.1