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-08-21 00:10:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-21 00:10:36 +0300
commit3867f4726590bd73909adbc51a71f6399aa1b6dc (patch)
tree603bd159fc15b9ddb9896aa1e01e38c8957b0990 /lib/gitlab/timeless.rb
parentbca3fb69e1e43c345ccac26a08ae1d374920020d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/timeless.rb')
-rw-r--r--lib/gitlab/timeless.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/timeless.rb b/lib/gitlab/timeless.rb
index 4f974c98c71..b72d33113dd 100644
--- a/lib/gitlab/timeless.rb
+++ b/lib/gitlab/timeless.rb
@@ -6,7 +6,8 @@ module Gitlab
original_record_timestamps = model.record_timestamps
model.record_timestamps = false
- if block.arity.abs == 1
+ # negative arity means arguments are optional
+ if block.arity == 1 || block.arity < 0
block.call(model)
else
block.call