Commit 61f7bede authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix using `try` on delegators in CI config entries

See:

https://github.com/rails/rails/commit/af53280a4b5b3323ac87dc60deb2b1b781197b2b
parent 06641a3f
......@@ -51,12 +51,12 @@ module Gitlab
def helpers(*nodes)
nodes.each do |symbol|
define_method("#{symbol}_defined?") do
@entries[symbol].specified?
@entries[symbol].specified? if @entries[symbol]
end
define_method("#{symbol}_value") do
raise Entry::InvalidError unless valid?
@entries[symbol].try(:value)
@entries[symbol].value if @entries[symbol]
end
alias_method symbol.to_sym, "#{symbol}_value".to_sym
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment