Commit 7a9f52b2 authored by alinamihaila's avatar alinamihaila

Use yield and remove StandardError

parent f6b556dc
......@@ -277,11 +277,11 @@ module Gitlab
def alt_usage_data(value = nil, fallback: -1, &block)
if block_given?
instance_eval(&block)
yield
else
value
end
rescue StandardError
rescue
fallback
end
......
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