Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-03 00:11:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-03 00:11:07 +0300
commiteb1755b2d90efcc161774f66ccd2317ad4c471de (patch)
tree9404125b4bec27588f2a479470e46a27043d94f0 /lib/gitlab/ci/variables
parentbf2439c21308c74e437b872180046b39a61734b5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/variables')
-rw-r--r--lib/gitlab/ci/variables/collection.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/ci/variables/collection.rb b/lib/gitlab/ci/variables/collection.rb
index 381a5cc41cb..45e2c535d3a 100644
--- a/lib/gitlab/ci/variables/collection.rb
+++ b/lib/gitlab/ci/variables/collection.rb
@@ -55,8 +55,12 @@ module Gitlab
def to_hash
self.to_runner_variables
- .map { |env| [env.fetch(:key), env.fetch(:value)] }
- .to_h.with_indifferent_access
+ .to_h { |env| [env.fetch(:key), env.fetch(:value)] }
+ .with_indifferent_access
+ end
+
+ def reject(&block)
+ Collection.new(@variables.reject(&block))
end
# Returns a sorted Collection object, and sets errors property in case of an error